mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 03:46:25 -06:00
18136 Allow Script running within a Branch
This commit is contained in:
parent
51e770fa9c
commit
2da12ed677
@ -39,7 +39,6 @@ class ScriptJob(JobRunner):
|
|||||||
"""
|
"""
|
||||||
logger = logging.getLogger(f"netbox.scripts.{script.full_name}")
|
logger = logging.getLogger(f"netbox.scripts.{script.full_name}")
|
||||||
logger.info(f"Running script (commit={commit})")
|
logger.info(f"Running script (commit={commit})")
|
||||||
print("running script")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
@ -53,7 +52,6 @@ class ScriptJob(JobRunner):
|
|||||||
logger.warning("Script failed")
|
logger.warning("Script failed")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"exception: {e}")
|
|
||||||
if type(e) is AbortScript:
|
if type(e) is AbortScript:
|
||||||
msg = _("Script aborted with error: ") + str(e)
|
msg = _("Script aborted with error: ") + str(e)
|
||||||
if is_report(type(script)):
|
if is_report(type(script)):
|
||||||
|
Loading…
Reference in New Issue
Block a user