euscan: Adding config file support

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino
2012-09-02 18:58:01 +02:00
parent 332b5d7c80
commit 2019b245e8
3 changed files with 13 additions and 2 deletions

View File

@ -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