diff options
author | 2012-09-02 18:58:01 +0200 | |
---|---|---|
committer | 2012-09-02 18:58:01 +0200 | |
commit | 2019b245e8c370d5b55b3e99e0da319d6a35146f (patch) | |
tree | c8f3a6b296b4fcc101ad3a46d68ef042b469a308 /pym/euscan | |
parent | euscan: Added XML output (diff) | |
download | euscan-2019b245e8c370d5b55b3e99e0da319d6a35146f.tar.gz euscan-2019b245e8c370d5b55b3e99e0da319d6a35146f.tar.bz2 euscan-2019b245e8c370d5b55b3e99e0da319d6a35146f.zip |
euscan: Adding config file support
Signed-off-by: volpino <fox91@anche.no>
Diffstat (limited to 'pym/euscan')
-rw-r--r-- | pym/euscan/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/euscan/__init__.py b/pym/euscan/__init__.py index dad6742..12c4a16 100644 --- a/pym/euscan/__init__.py +++ b/pym/euscan/__init__.py @@ -5,6 +5,10 @@ __version__ = "git" +import ConfigParser +import os + + CONFIG = { 'nocolor': False, 'quiet': False, @@ -27,6 +31,13 @@ CONFIG = { 'ebuild-uri': False, } +config = ConfigParser.ConfigParser() +config.read(['/etc/euscan.conf', os.path.expanduser('~/.euscan.conf')]) +if config.has_section("euscan"): + for key, value in config.items("euscan"): + if key in CONFIG: + CONFIG[key] = value + BLACKLIST_VERSIONS = [ # Compatibility package for running binaries linked against a # pre gcc 3.4 libstdc++, won't be updated |