[Python-checkins] r87286 - tracker/instances/python-dev/detectors/autonosy.py

ezio.melotti python-checkins at python.org
Wed Dec 15 23:09:41 CET 2010


Author: ezio.melotti
Date: Wed Dec 15 23:09:41 2010
New Revision: 87286
Log:
Check that the nodeid is not None when a new issue is created and priority and/or versions are not set
Modified:
 tracker/instances/python-dev/detectors/autonosy.py
Modified: tracker/instances/python-dev/detectors/autonosy.py
==============================================================================
--- tracker/instances/python-dev/detectors/autonosy.py	(original)
+++ tracker/instances/python-dev/detectors/autonosy.py	Wed Dec 15 23:09:41 2010
@@ -29,16 +29,20 @@
 nosy |= set(users)
 
 # get the new values if they changed or the already-set ones if they didn't
- priority = 'None'
 if 'priority' in newvalues:
 priority_id = newvalues['priority']
- else:
+ elif nodeid is not None:
 priority_id = db.issue.get(nodeid, 'priority')
+ else:
+ priority_id = None
+ priority = 'None'
 if priority_id is not None:
 priority = db.priority.get(priority_id, 'name')
+
+ versions = []
 if 'versions' in newvalues:
 versions = newvalues.get('versions', [])
- else:
+ elif nodeid is not None:
 versions = db.issue.get(nodeid, 'versions')
 
 if priority == 'release blocker':


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /