diff options
author | Martin Pihlak | 2011-03-24 11:01:06 +0000 |
---|---|---|
committer | Martin Pihlak | 2011-03-24 11:01:06 +0000 |
commit | b2a9809424207104ba2d716c44babd82b1fc72fe (patch) | |
tree | 43562e0572af020b41cca5d7df2cf796df169361 /python/walmgr.py | |
parent | a116b3fbe2d3635d45860e5c99e6bab1285469f8 (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-x | python/walmgr.py | 5 |
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 |