aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:48:40 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2008-02-05 20:48:40 +0000
commitbd902e2a4a1214bb34dadb58d5606888807778cc (patch)
tree1eb47107a2800dbc4cae650d73e17456bf8dcb78 /RepSys
parent2295fcbbaa57f13a838a2f18714b17d0b755cb2f (diff)
downloadmgarepo-bd902e2a4a1214bb34dadb58d5606888807778cc.tar
mgarepo-bd902e2a4a1214bb34dadb58d5606888807778cc.tar.gz
mgarepo-bd902e2a4a1214bb34dadb58d5606888807778cc.tar.bz2
mgarepo-bd902e2a4a1214bb34dadb58d5606888807778cc.tar.xz
mgarepo-bd902e2a4a1214bb34dadb58d5606888807778cc.zip
Make REPSYS_CONF override /etc/repsys.conf and ~/.repsys/config
This way we can have real control over where to look for configuration file. The old behavior was a problem for testes and things like.
Diffstat (limited to 'RepSys')
-rw-r--r--RepSys/ConfigParser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/RepSys/ConfigParser.py b/RepSys/ConfigParser.py
index 4dc3e3c..3b4e213 100644
--- a/RepSys/ConfigParser.py
+++ b/RepSys/ConfigParser.py
@@ -350,11 +350,12 @@ class Config:
self._config = ConfigParser()
self._wrapped = {}
conffiles = []
- conffiles.append("/etc/repsys.conf")
repsys_conf = os.environ.get("REPSYS_CONF")
if repsys_conf:
conffiles.append(repsys_conf)
- conffiles.append(os.path.expanduser("~/.repsys/config"))
+ else:
+ conffiles.append("/etc/repsys.conf")
+ conffiles.append(os.path.expanduser("~/.repsys/config"))
for file in conffiles:
if os.path.isfile(file):
self._config.read(file)