From 7ae64c7539dbb78d2e68c68d613b7cbeb07e97e5 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Jul 19 2015 20:33:38 +0000 Subject: add the DistGitDirectory class --- diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py index bcddd98..0b601d4 100644 --- a/src/centpkg/__init__.py +++ b/src/centpkg/__init__.py @@ -23,6 +23,14 @@ from pyrpkg import Commands, rpkgError from . import centos_cert from . import cli +class DistGitDirectory(object): + + def __init__(self, branchtext): + sigtobranchre = r'sig-(?P\w+)(?P\d)-?(?P\w+)?-?(?P\w+)?' + match = re.match(sigtobranchre, branchtext) + if match: + self.__dict__.update(match.groupdict()) + class Commands(pyrpkg.Commands): ''' For the pyrpkg commands with centpkg behavior