Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
55608031
Commit
55608031
authored
Feb 01, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Feb 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(configd) align exception handling
(cherry picked from commit
8f92a6a2
)
parent
a6ca7de3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
processhandler.py
src/opnsense/service/modules/processhandler.py
+8
-6
No files found.
src/opnsense/service/modules/processhandler.py
View file @
55608031
...
@@ -450,8 +450,9 @@ class Action(object):
...
@@ -450,8 +450,9 @@ class Action(object):
else
:
else
:
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] returned exit status
%
d'
%
(
message_uuid
,
exit_status
))
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] returned exit status
%
d'
%
(
message_uuid
,
exit_status
))
return
'Error (
%
d)'
%
exit_status
return
'Error (
%
d)'
%
exit_status
except
:
except
Exception
as
script_exception
:
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] Script action failed at
%
s'
%
(
message_uuid
,
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] Script action failed with
%
s at
%
s'
%
(
message_uuid
,
script_exception
,
traceback
.
format_exc
()))
traceback
.
format_exc
()))
return
'Execute error'
return
'Execute error'
elif
self
.
type
.
lower
()
==
'script_output'
:
elif
self
.
type
.
lower
()
==
'script_output'
:
...
@@ -469,8 +470,9 @@ class Action(object):
...
@@ -469,8 +470,9 @@ class Action(object):
script_error_output
.
strip
()[:
255
])
script_error_output
.
strip
()[:
255
])
)
)
return
script_output
return
script_output
except
:
except
Exception
as
script_exception
:
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] Script action failed at
%
s'
%
(
message_uuid
,
syslog
.
syslog
(
syslog
.
LOG_ERR
,
'[
%
s] Script action failed with
%
s at
%
s'
%
(
message_uuid
,
script_exception
,
traceback
.
format_exc
()))
traceback
.
format_exc
()))
return
'Execute error'
return
'Execute error'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment