[entropy.core.settings.base] SystemSettings._repositories_parser, validate repository db URL parameter

This commit is contained in:
Fabio Erculiani
2010-01-06 01:17:06 +01:00
parent 4851ed8318
commit 01a0b22dd1
+11 -1
View File
@@ -1190,7 +1190,8 @@ class SystemSettings(Singleton, EntropyPluginStore):
repodata['dbrevision']
my_repodata[reponame]['dbcformat'] = \
repodata['dbcformat']
else:
elif repodata['plain_database']:
my_repodata[reponame] = repodata.copy()
if not excluded:
@@ -1248,13 +1249,22 @@ class SystemSettings(Singleton, EntropyPluginStore):
# validate using mtime
dmp_path = etpConst['dumpstoragedir']
for repoid in repoids:
found_into = 'available'
if repoid in data['available']:
repo_data = data['available'][repoid]
elif repoid in data['excluded']:
repo_data = data['excluded'][repoid]
found_into = 'excluded'
else:
continue
# validate repository settings
if not repo_data['plain_database'].strip():
data[found_into].pop(repoid)
if repoid in data['order']:
data['order'].remove(repoid)
repo_db_path = os.path.join(repo_data['dbpath'],
etpConst['etpdatabasefile'])
repo_mtime_fn = "%s_%s_%s.mtime" % (repoid, data['branch'],