Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos.toolbox
Commits
63f84e79
Commit
63f84e79
authored
Jun 06, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pubsub notifier: produce more explicit RSS
parent
eab0d1fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
slapos/pubsub/notifier.py
slapos/pubsub/notifier.py
+11
-5
No files found.
slapos/pubsub/notifier.py
View file @
63f84e79
...
...
@@ -37,17 +37,23 @@ def main():
stderr
=
subprocess
.
STDOUT
)
exit_code
=
0
content
=
(
"OK</br><p>%s ran successfully</p>"
"<p>Output is: </p><pre>%s</pre>"
%
(
args
.
executable
[
0
],
content
.
replace
(
'&'
,
'&'
).
replace
(
'<'
,
'<'
).
replace
(
'>'
,
'>'
)
))
except
subprocess
.
CalledProcessError
as
e
:
content
=
e
.
output
exit_code
=
e
.
returncode
content
=
(
"FAILURE</br><p>%s Failed with returncode <em>%d</em>.</p>"
"<p>Output is: </p><pre>%s</pre>"
%
(
args
.
executable
[
0
],
exit_code
,
content
.
replace
(
'&'
,
'&'
).
replace
(
'<'
,
'<'
).
replace
(
'>'
,
'>'
)
))
print
content
content
+=
(
"
\
n
<p>Failed with returncode <em>%d</em>.</p>"
"<p>Output is: </p><pre>%s</pre>"
%
(
exit_code
,
content
.
replace
(
'&'
,
'&'
).
replace
(
'<'
,
'<'
).
replace
(
'>'
,
'>'
)
))
with
open
(
args
.
logfile
[
0
],
'a'
)
as
file_
:
cvsfile
=
csv
.
writer
(
file_
)
...
...
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