From a20f1d85c430908b1eeef81b72127dab77383350 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sat, 24 Sep 2011 11:46:09 +0100
Subject: [PATCH] fix the logic for realtime_watch option

---
 client/djrandom_client/client.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/client/djrandom_client/client.py b/client/djrandom_client/client.py
index 5ed5d39..d99fe03 100644
--- a/client/djrandom_client/client.py
+++ b/client/djrandom_client/client.py
@@ -109,8 +109,7 @@ def main():
                       help='URL to the API endpoint')
     parser.add_option('--bwlimit', type='int',
                       help='Bandwidth limit (in KBps, default unlimited)')
-    parser.add_option('--realtime_watch', action='store_true',
-                      default=True,
+    parser.add_option('--no_realtime_watch', action='store_true',
                       help='Monitor music_dir in realtime')
     daemonize.add_standard_options(parser)
     utils.read_config_defaults(
@@ -127,9 +126,7 @@ def main():
 
     # Reading from the configuration file will set this variable to
     # a string, convert it back into boolean.
-    do_realtime = opts.realtime_watch
-    if isinstance(do_realtime, basestring):
-        do_realtime = (do_realtime.lower() in ('true', 'on', 'yes'))
+    do_realtime = not opts.no_realtime_watch
 
     daemonize.daemonize(opts, run_client, 
                         (opts.server_url, opts.music_dir, opts.api_key,
-- 
GitLab