From 2f38fdac226b5b5bd02a78e9933ec46b05cac32d Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 11 Apr 2011 04:09:16 +0000 Subject: syncdaemon: minor fixes - fix yet another instance of calling exit (instead of {sys.,os._}exit) - fix logging to stderr with "-" as logfile - whitespace fix Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570 --- xlators/features/marker/utils/syncdaemon/gsyncd.py | 4 ++-- xlators/features/marker/utils/syncdaemon/monitor.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/features/marker/utils/syncdaemon') diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index fb2fe522bce..d759f6b8dba 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -87,7 +87,7 @@ def startup(**kw): if getattr(gconf, 'pid_file', None) and kw.get('go_daemon') != 'postconn': if not grabpidfile(): sys.stderr.write("pidfile is taken, exiting.\n") - exit(2) + sys.exit(2) if kw.get('go_daemon') == 'should': x, y = os.pipe() @@ -178,7 +178,7 @@ def main_i(): rconf = {'go_daemon': 'should'} def store_abs(opt, optstr, val, parser): - if val: + if val and val != '-': val = os.path.abspath(val) setattr(parser.values, opt.dest, val) def store_local(opt, optstr, val, parser): diff --git a/xlators/features/marker/utils/syncdaemon/monitor.py b/xlators/features/marker/utils/syncdaemon/monitor.py index 3f327b6d04d..afc6403d2b1 100644 --- a/xlators/features/marker/utils/syncdaemon/monitor.py +++ b/xlators/features/marker/utils/syncdaemon/monitor.py @@ -28,7 +28,7 @@ class Monitor(object): self.set_state('starting...') ret = 0 - def nwait(p, o=0): + def nwait(p, o=0): p2, r = os.waitpid(p, o) if not p2: return -- cgit