From 858a96220564388629dd60cff345cb4eb96c78b3 Mon Sep 17 00:00:00 2001 From: Ales Raszka Date: Oct 05 2015 09:14:21 +0000 Subject: Switch-branch: give more info about error Resolves: bz#1261397 Signed-off-by: Ales Raszka --- diff --git a/src/pyrpkg/__init__.py b/src/pyrpkg/__init__.py index b9f16be..7e1ade0 100644 --- a/src/pyrpkg/__init__.py +++ b/src/pyrpkg/__init__.py @@ -1658,9 +1658,9 @@ class Commands(object): self.repo.git.checkout(branch) # The above should have no output, but stash it anyway self.log.info("Switched to branch '%s'" % branch) - except: + except Exception as err: # This needs to be finer grained I think... - raise rpkgError('Could not check out %s' % branch) + raise rpkgError('Could not check out %s\n%s' % (branch, err.stderr)) return def file_exists(self, pkg_name, filename, checksum):