Attempt to handle misformatted change requests

For whatever reason some folks put "Branches" instead of "New Branches"
in their change requests.  Try to handle this better, but I don't think
it's working properly yet.
This commit is contained in:
Jason Tibbitts 2010-10-13 13:12:55 -05:00
parent 703371fab6
commit 6846f2a586

View file

@ -557,6 +557,14 @@ def process_change_request(bug, comment, allcomments, firstfound, pkgdb, branche
# Try to enforce EPEL branch rules
if not len(owners):
warnings.append("WARNING: Package does not appear to exist in pkgdb currently.")
if not len(items['New Branches']) and len(items['Branches']):
warnings.append("NOTE: Misformatted request; using 'Branches' instead.")
items['New Branches'] == items['Branches'];
request['newbranches'] = request['branches']
print items
print request
for i in owners.keys():
if request['owner'] == owners[i]['primary'] or request['owner'] in owners[i]['comaint']:
owned = True