[Inteproxy-commits] r99 - in trunk: . inteproxy
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 16 19:44:45 CEST 2007
Author: bh
Date: 2007-05-16 19:44:45 +0200 (Wed, 16 May 2007)
New Revision: 99
Modified:
trunk/ChangeLog
trunk/inteproxy/main.py
trunk/inteproxy/resources.py
Log:
* inteproxy/resources.py (default_config_file): New function to
determine the name of the default configuration file.
* inteproxy/main.py (run_server): Use the new default_config_file
function.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-16 16:30:33 UTC (rev 98)
+++ trunk/ChangeLog 2007-05-16 17:44:45 UTC (rev 99)
@@ -1,5 +1,13 @@
2007-05-16 Bernhard Herzog <bh at intevation.de>
+ * inteproxy/resources.py (default_config_file): New function to
+ determine the name of the default configuration file.
+
+ * inteproxy/main.py (run_server): Use the new default_config_file
+ function.
+
+2007-05-16 Bernhard Herzog <bh at intevation.de>
+
* inteproxy/resources.py (in_py2exe): New function to determine
whether the program is running in a py2exe generated execitable
Modified: trunk/inteproxy/main.py
===================================================================
--- trunk/inteproxy/main.py 2007-05-16 16:30:33 UTC (rev 98)
+++ trunk/inteproxy/main.py 2007-05-16 17:44:45 UTC (rev 99)
@@ -109,8 +109,7 @@
# (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")
+ default_config_file = inteproxy.resources.default_config_file()
parser.set_defaults(port=64609, workers=5, debug_level=0,
config_file=default_config_file)
parser.add_option("--logfile")
Modified: trunk/inteproxy/resources.py
===================================================================
--- trunk/inteproxy/resources.py 2007-05-16 16:30:33 UTC (rev 98)
+++ trunk/inteproxy/resources.py 2007-05-16 17:44:45 UTC (rev 99)
@@ -47,3 +47,8 @@
basename of the image file in that directory.
"""
return os.path.join(share_dir, "images", basename)
+
+
+def default_config_file():
+ """Returns the name of the default configuration file"""
+ return os.path.join(_base_dir, "inteproxy.cfg")
More information about the Inteproxy-commits
mailing list