From: khamidou Date: Wed, 31 Mar 2010 19:31:58 +0000 (+0200) Subject: added an option to liszt-daemon to run in non-daemon mode X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5cb67eec60809c4dde0634ce4fee3b025bd0961b;p=liszt.git added an option to liszt-daemon to run in non-daemon mode --- diff --git a/libliszt/utils.py b/libliszt/utils.py index 7368165..6bbb5e8 100644 --- a/libliszt/utils.py +++ b/libliszt/utils.py @@ -201,6 +201,8 @@ class LisztSession: def get_list(self, listname): req = None + print type(listname) + listname = listname.encode("utf8") try: req = urllib2.urlopen(base + "/get/" + quote(listname) + "/") diff --git a/liszt-daemon b/liszt-daemon index 778adc4..865262e 100755 --- a/liszt-daemon +++ b/liszt-daemon @@ -163,5 +163,8 @@ class LisztDaemon(Daemon): if __name__ == "__main__": daemon = LisztDaemon(pidfile="/var/lock/liszt-daemon.pidfile") - daemon.run() -# daemon.start() + + if sys.argv[1] == "--no-fork": + daemon.run() + else: + daemon.start()