patch2 for issue 288

This commit is contained in:
Xibo Ning 2016-08-11 22:28:47 +08:00 committed by Mike McLean
parent 9cfadf7529
commit 9bf49841ad
5 changed files with 76 additions and 0 deletions

View file

@ -229,6 +229,11 @@ class SCM(object):
# should never happen
raise koji.GenericError('Invalid SCM URL: %s' % url)
def contextData(self, keys=None):
if keys is None:
keys = ["url", "scheme", "user", "host", "path", "query", "revision", "scmtype"]
return dict([(k, vars(self)[k]) for k in keys if vars(self).has_key(k)])
def _parse_url(self):
"""
Parse the SCM url into usable components.