Config structs aren't dicts, so neither []-indexing nor .get work on
[invirt/packages/invirt-dev.git] / python / invirt / builder.py
index 27e21a6..e3280aa 100644 (file)
@@ -26,17 +26,17 @@ class InvalidBuild(ValueError):
 
 def getRepo(package):
     """Return the path to the git repo for a given package."""
-    return os.path.join(_REPO_DIR, 'packages', '%s.git' % package)
+    return os.path.join(_REPO_DIR, 'invirt/packages', '%s.git' % 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):