]> khamidou — GitHub mirrors - liszt.git/commitdiff
added an option to liszt-daemon to run in non-daemon mode.
authorkhamidou <khamidou@gmail.com>
Wed, 31 Mar 2010 19:31:58 +0000 (21:31 +0200)
committerkhamidou <khamidou@gmail.com>
Wed, 31 Mar 2010 19:33:31 +0000 (21:33 +0200)
libliszt/utils.py
liszt-daemon

index 206bda3083896f7a434c535e1a38f7e1e63decb8..1bcc8443e5ee56edea7593f33222490f45e1564e 100644 (file)
@@ -205,6 +205,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) + "/")
index 64ba311c73510d4daa21b36bede6176d4d5eee9a..2dd8b847bc096765df798ef0b79a53aa6ee4acae 100755 (executable)
@@ -162,4 +162,9 @@ class LisztDaemon(Daemon):
 
 if __name__ == "__main__":
    daemon = LisztDaemon(pidfile="/var/lock/liszt-daemon.pidfile")
-   daemon.start()
+
+   if sys.argv[1] == "--no-fork":
+       daemon.run()
+   else:
+       daemon.start()
+