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
Xavier Thompson
slapos.toolbox
Commits
2d7be8cf
Commit
2d7be8cf
authored
6 years ago
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notifier: do not fail if feed files was rotated
/reviewed-on
nexedi/slapos.toolbox!32
parent
9d6485ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
slapos/pubsub/notifier.py
slapos/pubsub/notifier.py
+4
-3
No files found.
slapos/pubsub/notifier.py
View file @
2d7be8cf
...
...
@@ -116,7 +116,8 @@ def main():
try
:
shutil
.
copy2
(
args
.
logfile
[
0
],
temp_file
)
except
IOError
:
error_message
=
"ERROR ON WRITING FEED"
# previous feed can be rotated, only pass
pass
try
:
with
open
(
temp_file
,
'a'
)
as
file_
:
csvfile
=
csv
.
writer
(
file_
)
...
...
@@ -127,8 +128,8 @@ def main():
'slapos:%s'
%
uuid
.
uuid4
(),
])
os
.
rename
(
temp_file
,
args
.
logfile
[
0
])
except
:
error_message
=
"ERROR ON WRITING FEED
"
except
Exception
,
e
:
error_message
=
"ERROR ON WRITING FEED
- %s"
%
str
(
e
)
finally
:
try
:
os
.
remove
(
temp_file
)
...
...
This diff is collapsed.
Click to expand it.
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