]> 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:31:58 +0000 (21:31 +0200)
libliszt/utils.py
liszt-daemon

index 7368165459e06e54efc6824efe5d78589a826ce7..6bbb5e84b64252b7378f8ee6022d9c313b4d8c83 100644 (file)
@@ -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) + "/")
index 778adc425eca5232e22fc6d366e6b85fa5e98105..865262e7611c0e928e341b18204d1f741f5a5149 100755 (executable)
@@ -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()