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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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
Show 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,18 +37,24 @@ def main():
...
@@ -37,18 +37,24 @@ def main():
stderr
=
subprocess
.
STDOUT
stderr
=
subprocess
.
STDOUT
)
)
exit_code
=
0
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
:
except
subprocess
.
CalledProcessError
as
e
:
content
=
e
.
output
content
=
e
.
output
exit_code
=
e
.
returncode
exit_code
=
e
.
returncode
content
=
(
"FAILURE</br><p>%s Failed with returncode <em>%d</em>.</p>"
print
content
content
+=
(
"
\
n
<p>Failed with returncode <em>%d</em>.</p>"
"<p>Output is: </p><pre>%s</pre>"
%
(
"<p>Output is: </p><pre>%s</pre>"
%
(
args
.
executable
[
0
],
exit_code
,
exit_code
,
content
.
replace
(
'&'
,
'&'
).
replace
(
'<'
,
'<'
).
replace
(
'>'
,
'>'
)
content
.
replace
(
'&'
,
'&'
).
replace
(
'<'
,
'<'
).
replace
(
'>'
,
'>'
)
))
))
print
content
with
open
(
args
.
logfile
[
0
],
'a'
)
as
file_
:
with
open
(
args
.
logfile
[
0
],
'a'
)
as
file_
:
cvsfile
=
csv
.
writer
(
file_
)
cvsfile
=
csv
.
writer
(
file_
)
cvsfile
.
writerow
([
cvsfile
.
writerow
([
...
...
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