summaryrefslogtreecommitdiff
path: root/python/walmgr.py
diff options
context:
space:
mode:
authorMartin Pihlak2011-03-24 11:01:06 +0000
committerMartin Pihlak2011-03-24 11:01:06 +0000
commitb2a9809424207104ba2d716c44babd82b1fc72fe (patch)
tree43562e0572af020b41cca5d7df2cf796df169361 /python/walmgr.py
parenta116b3fbe2d3635d45860e5c99e6bab1285469f8 (diff)
fix pid writing in slave xlock.
Slave xlock should not attempt to write pid to BACKUPLOCK if none was specified on command line.
Diffstat (limited to 'python/walmgr.py')
-rwxr-xr-xpython/walmgr.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/walmgr.py b/python/walmgr.py
index 94f2b0e0..a7ea189c 100755
--- 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