projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a116b3f
)
fix pid writing in slave xlock.
author
Martin Pihlak
<martin.pihlak@gmail.com>
Thu, 24 Mar 2011 11:01:06 +0000
(13:01 +0200)
committer
Martin Pihlak
<martin.pihlak@gmail.com>
Thu, 24 Mar 2011 11:01:06 +0000
(13:01 +0200)
Slave xlock should not attempt to write pid to BACKUPLOCK
if none was specified on command line.
python/walmgr.py
patch
|
blob
|
blame
|
history
diff --git
a/python/walmgr.py
b/python/walmgr.py
index 94f2b0e026217981eca6d3c73345d2ebaa6a0e6f..a7ea189c9d7fc50675426027373ff6026def0d9e 100755
(executable)
--- a/
python/walmgr.py
+++ b/
python/walmgr.py
@@
-1966,7
+1966,10
@@
STOP TIME: %(stop_time)s
return 1
if not self.not_really:
- open(lockfile, "w").write(self.args[0])
+ f = open(lockfile, "w")
+ if len(self.args) > 0:
+ f.write(self.args[0])
+ f.close()
self.log.info("Backup lock obtained.")
return 0