From bd902e2a4a1214bb34dadb58d5606888807778cc Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 5 Feb 2008 20:48:40 +0000 Subject: 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. --- CHANGES | 2 ++ RepSys/ConfigParser.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index fa2089f..849b3ae 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,8 @@ interactivity at all with ssh - fixed bad url used when using -v in getsrpm - make 'repsys submit' without package name or revision number work again +- if REPSYS_CONF is set, /etc/repsys.conf and ~/.repsys/config will not be + readed anymore - added option -F to repsys ci to set a log message file - the fix for the unreleased commits problem in the previous release was wrong, really fixed it 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) -- cgit v1.2.1