web/hosts/issues/detectors sanitycheck.py,1.3,1.4
Stefan Seefeld <[email protected]> Thu, 09 Oct 2003 05:24:58 +0000
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/web/hosts/issues/detectors
In directory purcel:/tmp/cvs-serv21097
Modified Files:
sanitycheck.py
Log Message:
add missing parens
Index: sanitycheck.py
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/detectors/sanitycheck.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sanitycheck.py 7 Oct 2003 00:16:41 -0000 1.3
+++ sanitycheck.py 9 Oct 2003 05:24:55 -0000 1.4
@@ -7,14 +7,14 @@
def check_bug_permissions(db, cl, newvalues):
"""Check wether the user tried to change something he shouldn't have."""
if not db.security.hasPermission('Process', db.getuid(), cl.classname):
- if newvalues.has_key('assignedto')
- or newvalues.has_key('bug_type')
- or newvalues.has_key('severity')
- or newvalues.has_key('topics')
- or newvalues.has_key('status')
- or newvalues.has_key('resolution')
- or newvalues.has_key('dependson')
- or newvalues.has_key('superseder'):
+ if (newvalues.has_key('assignedto')
+ or newvalues.has_key('bug_type')
+ or newvalues.has_key('severity')
+ or newvalues.has_key('topics')
+ or newvalues.has_key('status')
+ or newvalues.has_key('resolution')
+ or newvalues.has_key('dependson')
+ or newvalues.has_key('superseder')):
raise ValueError, "You don't have permission to edit one of the selected fields."
def check_task_permissions(db, cl, newvalues):
@@ -26,10 +26,10 @@
"""Check wether the user tried to change something he shouldn't have."""
if not db.security.hasPermission('Process', db.getuid(), cl.classname):
- if newvalues.has_key('bugs')
- or newvalues.has_key('tasks')
- or newvalues.has_key('status')
- or newvalues.has_key('release_date'):
+ if (newvalues.has_key('bugs')
+ or newvalues.has_key('tasks')
+ or newvalues.has_key('status')
+ or newvalues.has_key('release_date')):
raise ValueError, "You don't have permission to edit one of the selected fields."
#
@@ -57,14 +57,14 @@
# Check status and related values:
if newvalues.has_key('status'):
- if newvalues['status'] == db.status.lookup('open')
- and not newvalues.has_key('assignedto'):
+ if (newvalues['status'] == db.status.lookup('open')
+ and not newvalues.has_key('assignedto')):
raise ValueError, "You need to provide an assignee when setting the status to open or closed."
if newvalues['status'] == db.status.lookup('closed'):
# Do we have a assignedto?
- if not newvalues.has_key('assignedto')
- and not cl.get(nodeid, 'assignedto'):
+ if (not newvalues.has_key('assignedto')
+ and not cl.get(nodeid, 'assignedto')):
raise ValueError, "You need to provide an assignee when setting the status to open or closed."
# Do we have a resolution?
@@ -77,8 +77,8 @@
raise ValueError, "The assignee is not a developer."
if newvalues.has_key('status'):
- if newvalues['status'] != db.status.lookup('open')
- and newvalues['status'] != db.status.lookup('closed'):
+ if (newvalues['status'] != db.status.lookup('open')
+ and newvalues['status'] != db.status.lookup('closed')):
raise ValueError, "When assigning someone to a bug the status must be open or closed."
else:
newvalues['status'] = db.status.lookup('open')