From: Evan Broder Date: Sat, 5 Dec 2009 22:08:49 +0000 (-0500) Subject: Config structs aren't dicts, so neither []-indexing nor .get work on X-Git-Tag: 0.1.5~53 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/commitdiff_plain/479b1cb73a333fa76e7d05f4000eb6267d8682c6?ds=sidebyside Config structs aren't dicts, so neither []-indexing nor .get work on them. svn path=/trunk/packages/invirt-dev/; revision=2587 --- diff --git a/python/invirt/builder.py b/python/invirt/builder.py index b8e9c0b..e3280aa 100644 --- a/python/invirt/builder.py +++ b/python/invirt/builder.py @@ -31,12 +31,12 @@ def getRepo(package): def pocketToGit(pocket): """Map a pocket in the configuration to a git branch.""" - return config.git.pockets[pocket].get('git', pocket) + return getattr(getattr(config.git.pockets, pocket), 'git', pocket) def pocketToApt(pocket): """Map a pocket in the configuration to an apt repo pocket.""" - return config.git.pockets[pocket].get('apt', pocket) + return getattr(getattr(config.git.pockets, pocket), 'apt', pocket) def getGitFile(package, ref, path):