[Inteproxy-commits] r45 - trunk

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Apr 17 16:25:10 CEST 2007


Author: bh
Date: 2007-04-17 16:25:10 +0200 (Tue, 17 Apr 2007)
New Revision: 45

Modified:
   trunk/ChangeLog
   trunk/InteProxy.py
Log:
* InteProxy.py (run_server): Use an absolute filename for the
default config file, so that it must be in the same directory as
InteProxy.py and we don't accidentally pick up other config files
if InteProxy is started with a different working directory.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-04-12 14:13:39 UTC (rev 44)
+++ trunk/ChangeLog	2007-04-17 14:25:10 UTC (rev 45)
@@ -1,3 +1,10 @@
+2007-04-17  Bernhard Herzog  <bh at intevation.de>
+
+	* InteProxy.py (run_server): Use an absolute filename for the
+	default config file, so that it must be in the same directory as
+	InteProxy.py and we don't accidentally pick up other config files
+	if InteProxy is started with a different working directory.
+
 2007-04-12	Stephan Holl     <stephan.holl at intevation.de>
 
 	* InteProxy-de.odt/InteProxy-en.odt: Update of documentation

Modified: trunk/InteProxy.py
===================================================================
--- trunk/InteProxy.py	2007-04-12 14:13:39 UTC (rev 44)
+++ trunk/InteProxy.py	2007-04-17 14:25:10 UTC (rev 45)
@@ -365,8 +365,15 @@
                ServerClass = MasterWorkerServer):
     """Run the InteProxy server"""
     parser = optparse.OptionParser()
+    # The default config file name.  It's an absolute filename for the
+    # default config file, so that it must be in a specific directory
+    # (for now the same directory as InteProxy.py) and we don't
+    # accidentally pick up other config files if InteProxy is started
+    # with a different working directory.
+    default_config_file = os.path.join(os.path.dirname(__file__),
+                                       "inteproxy.cfg")
     parser.set_defaults(port=64609, workers=5, debug_level=0,
-                        config_file="inteproxy.cfg")
+                        config_file=default_config_file)
     parser.add_option("--logfile")
     parser.add_option("--allow-shutdown", action="store_true")
     parser.add_option("--port", type="int")



More information about the Inteproxy-commits mailing list