From b6af5309c5fd3f3e957bd9f9a98fe7f379ae37fc Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Jan 06 2012 01:43:55 +0000 Subject: Handle koji config with unknown module name When we aren't directly working with a module, but still need to hit koji, default to the default koji config. --- diff --git a/src/pyrpkg/fedpkg/__init__.py b/src/pyrpkg/fedpkg/__init__.py index 1a4bb36..11a8319 100644 --- a/src/pyrpkg/fedpkg/__init__.py +++ b/src/pyrpkg/fedpkg/__init__.py @@ -103,6 +103,13 @@ class Commands(pyrpkg.Commands): secondary arch config depending on the package """ + # We have to allow this to work, even if we don't have a package + # we're working on, for things like gitbuildhash. + try: + null = self.module_name + except: + self._kojiconfig = self._orig_kojiconfig + return for arch in self.secondary_arch.keys(): if self.module_name in self.secondary_arch[arch]: self._kojiconfig = os.path.expanduser('~/.koji/%s-config' %