changeset 3795:6e73d9be3e3f

merge 1.7
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 24 Jun 2008 18:58:51 +0200
parents 4f1d2cd9879b (current diff) c62beb39c64c (diff)
children 668a7f2f1775
files
diffstat 3 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/server/standalone.py	Tue Jun 24 18:23:32 2008 +0200
+++ b/MoinMoin/script/server/standalone.py	Tue Jun 24 18:58:51 2008 +0200
@@ -121,8 +121,7 @@
                 Config.requestQueueSize = self.options.requestQueueSize
 
             if self.options.start:
-                daemon = Daemon('moin', run, Config)
-                daemon.pidfile = pidfile
+                daemon = Daemon('moin', pidfile, run, Config)
                 daemon.do_start()
             else:
                 run(Config)
--- a/MoinMoin/search/queryparser.py	Tue Jun 24 18:23:32 2008 +0200
+++ b/MoinMoin/search/queryparser.py	Tue Jun 24 18:58:51 2008 +0200
@@ -960,6 +960,8 @@
                             # doing a "MatchAll AND_NOT someterm" for that case!
                             orexpr = OrExpression(terms)
                         terms = AndExpression(orexpr)
+                    else:
+                        raise ValueError('Nothing to OR')
                     remaining = self._analyse_items(items)
                     if remaining.__class__ == OrExpression:
                         for sub in remaining.subterms():
--- a/MoinMoin/server/daemon.py	Tue Jun 24 18:23:32 2008 +0200
+++ b/MoinMoin/server/daemon.py	Tue Jun 24 18:58:51 2008 +0200
@@ -17,7 +17,8 @@
     # Daemon script
     import daemon
     import myserver
-    script = daemon.DaemonScript('myserver', myserver.run, myserver.Config)
+    script = daemon.DaemonScript('myserver', 'myserver.pid',
+                                 myserver.run, myserver.Config)
     script.run()
 
 
@@ -61,10 +62,11 @@
     """
     commandPrefix = 'do_'
 
-    def __init__(self, name, function, *args, **kw):
+    def __init__(self, name, pidfile, function, *args, **kw):
         """ Create a daemon
 
-        @param name: name of the process (determines pid filename, too)
+        @param name: name of the process
+        @param pidfile: pid filename
         @param function: the server main function, will block until the
             server is done.
         @param args: arguments to pass to function
@@ -74,7 +76,7 @@
         self.function = function
         self.args = args
         self.kw = kw
-        self.pidFile = os.path.abspath(name + '.pid')
+        self.pidFile = os.path.abspath(pidfile)
 
     # --------------------------------------------------------------------
     # Commands