summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeConfigParser.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-07 09:54:32 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-07 09:54:32 +0200
commit066ca0ae74c842d5e55f527cfdab05df5d77f631 (patch)
treecee5ed5bbc75cedd1de1fbc141a0a132ec834612 /DistUpgrade/DistUpgradeConfigParser.py
parent288544afdf646aeebaa1dc7790612a1af098352b (diff)
parentd754e704d6e42bff9f1f8485e134fd4d04cb3a24 (diff)
downloadpython-apt-066ca0ae74c842d5e55f527cfdab05df5d77f631.tar.gz
* merged with mainline
Diffstat (limited to 'DistUpgrade/DistUpgradeConfigParser.py')
-rw-r--r--DistUpgrade/DistUpgradeConfigParser.py7
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)