Skip to content

Commit 32f36b5

Browse files
committed
Added to the FAQ: how to filter roundup emails and a reference to the wiki for linking to revisions in a version control system.
2 parents 7fbe012 + 19bcb02 commit 32f36b5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

roundup/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ def add_section(self, section, options, description=None):
10081008
*not* have aliases!
10091009
10101010
"""
1011-
if description or not self.section_descriptions.has_key(section):
1011+
if description or not (section in self.section_descriptions):
10121012
self.section_descriptions[section] = description
10131013
for option_def in options:
10141014
klass = option_def[0]
@@ -1327,7 +1327,7 @@ def keys(self):
13271327
# attribute emulation
13281328

13291329
def __setattr__(self, name, value):
1330-
if self.__dict__.has_key(name) or hasattr(self.__class__, name):
1330+
if (name in self.__dict__) or hasattr(self.__class__, name):
13311331
self.__dict__[name] = value
13321332
else:
13331333
self._get_option(name).set(value)

roundup/security.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def getPermission(self, permission, classname=None, properties=None,
144144
145145
Raise ValueError if there is no exact match.
146146
'''
147-
if not self.permission.has_key(permission):
147+
if permission not in self.permission:
148148
raise ValueError, 'No permission "%s" defined'%permission
149149

150150
if classname:
@@ -187,7 +187,7 @@ def hasPermission(self, permission, userid, classname=None,
187187
if itemid and classname is None:
188188
raise ValueError, 'classname must accompany itemid'
189189
for rolename in self.db.user.get_roles(userid):
190-
if not rolename or not self.role.has_key(rolename):
190+
if not rolename or (rolename not in self.role):
191191
continue
192192
# for each of the user's Roles, check the permissions
193193
for perm in self.role[rolename].permissions:
@@ -269,7 +269,7 @@ def hasSearchPermission(self, userid, classname, property):
269269
the list.
270270
'''
271271
roles = [r for r in self.db.user.get_roles(userid)
272-
if r and self.role.has_key(r)]
272+
if r and (r in self.role)]
273273
return self.roleHasSearchPermission (classname, property, *roles)
274274

275275
def addPermission(self, **propspec):

0 commit comments

Comments
 (0)