diff options
| author | glatzor@ubuntu.com <> | 2006-09-09 23:02:52 +0200 |
|---|---|---|
| committer | glatzor@ubuntu.com <> | 2006-09-09 23:02:52 +0200 |
| commit | a5a1685317f25de0a0d7bd8ccc5317a17fa219bf (patch) | |
| tree | 4eaf74f7e56334a1a8c787b2ac5d8ee1f675c3bd /DistUpgrade/DistUpgradeConfigParser.py | |
| parent | 650cb474d23914be801af09d5f9c31cfc9765b07 (diff) | |
| parent | e4b06af1ace3bbb4281a9c762113f8a2699116c3 (diff) | |
| download | python-apt-a5a1685317f25de0a0d7bd8ccc5317a17fa219bf.tar.gz | |
* merge with mvo
Diffstat (limited to 'DistUpgrade/DistUpgradeConfigParser.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeConfigParser.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeConfigParser.py b/DistUpgrade/DistUpgradeConfigParser.py index a4c55080..6879dfda 100644 --- a/DistUpgrade/DistUpgradeConfigParser.py +++ b/DistUpgrade/DistUpgradeConfigParser.py @@ -2,9 +2,10 @@ from ConfigParser import ConfigParser, NoOptionError class DistUpgradeConfig(ConfigParser): - def __init__(self): + def __init__(self, datadir): ConfigParser.__init__(self) - self.read(['DistUpgrade.cfg']) + self.datadir=datadir + self.read([datadir+'/DistUpgrade.cfg']) def getlist(self, section, option): try: tmp = self.get(section, option) @@ -17,7 +18,7 @@ class DistUpgradeConfig(ConfigParser): filename = self.get(section, option) except NoOptionError: return [] - items = [x.strip() for x in open(filename)] + items = [x.strip() for x in open(self.datadir+"/"+filename)] return filter(lambda s: not s.startswith("#") and not s == "", items) |
