diff --git a/cclint b/cclint index 1e800b6..7168021 100755 --- a/cclint +++ b/cclint @@ -44,10 +44,15 @@ def main(files=[]): raise AssertionError for attr in ['localdir','remotedir','desturl']: - are = re.match(MIRRORREGEX, se._asdict()[attr]).groupdict() - if are['centosversion'] != gs['centosversion']: - msg = 'version location of {0} does not match the CentOS Version of the CBS tag'.format(attr) - raise AssertionError + match = re.match(MIRRORREGEX, se._asdict()[attr]) + if not match: + msg = 'Malformed directory: {}\n {} does not match pattern: {}'.format(se._asdict()[attr], attr, MIRRORREGEX) + raise AssertionError + are = match.groupdict() + + if are['centosversion'] != gs['centosversion']: + msg = 'version location of {0} does not match the CentOS Version of the CBS tag'.format(attr) + raise AssertionError except AttributeError, e: msg = 'bad cbs tag!'