Map apps in memory from appid to appinfo

Instead of storing them in a list and doing linear searches by appinfo['id']
This commit is contained in:
Daniel Martí 2014-08-16 12:46:02 +02:00
parent 880f75110e
commit 94c29f9c37
11 changed files with 108 additions and 113 deletions

View file

@ -88,9 +88,9 @@ def main():
allapps = metadata.read_metadata()
vercodes = common.read_pkg_args(args, True)
allaliases = []
for app in allapps:
for appid in allapps:
m = md5.new()
m.update(app['id'])
m.update(appid)
keyalias = m.hexdigest()[:8]
if keyalias in allaliases:
logging.error("There is a keyalias collision - publishing halted")