commit:     7c6cbf30221368c5526f8036f0b6d9b7b28210dc
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 19 16:26:23 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 16:26:23 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c6cbf30

repoman/repos.py: Detect the lack of a vcs type in vcs_settings to not do a 
function call

 pym/repoman/repos.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pym/repoman/repos.py b/pym/repoman/repos.py
index 1a3a0d5..f16bf7a 100644
--- a/pym/repoman/repos.py
+++ b/pym/repoman/repos.py
@@ -61,8 +61,11 @@ class RepoSettings(object):
                        qawarnings.add("virtual.oldstyle")
 
                if self.repo_config.sign_commit:
-                       func = getattr(self, '_vcs_gpg_%s' % vcs_settings.vcs)
-                       func()
+                       if vcs_settings.vcs:
+                               func = getattr(self, '_vcs_gpg_%s' % 
vcs_settings.vcs)
+                               func()
+                       else:
+                               logging.warning("No VCS type detected, unable 
to sign the commit")
 
                # In order to disable manifest signatures, repos may set
                # "sign-manifests = false" in metadata/layout.conf. This

Reply via email to