Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 5381:0942fe89e82e
Python 3 preparation: change "x.has_key(y)" to "y in x".
(Also likewise "not in" where appropriate.) Tool-generated patch.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 22:08:17 +0000 |
| parents | 35ea9b1efc14 |
| children | 23b8e6067f7c |
comparison
equal
deleted
inserted
replaced
| 5380:64c4e43fbb84 | 5381:0942fe89e82e |
|---|---|
| 311 if prop in self.db.msg.properties: | 311 if prop in self.db.msg.properties: |
| 312 allowed = allowed and self.db.security.hasPermission( | 312 allowed = allowed and self.db.security.hasPermission( |
| 313 'View', userid, 'msg', prop, msgid) | 313 'View', userid, 'msg', prop, msgid) |
| 314 return (userid and | 314 return (userid and |
| 315 (self.db.user.get(userid, 'username') != 'anonymous') and | 315 (self.db.user.get(userid, 'username') != 'anonymous') and |
| 316 allowed and not seen_message.has_key(userid)) | 316 allowed and userid not in seen_message) |
| 317 | 317 |
| 318 # possibly send the message to the author, as long as they aren't | 318 # possibly send the message to the author, as long as they aren't |
| 319 # anonymous | 319 # anonymous |
| 320 if (good_recipient(authid) and | 320 if (good_recipient(authid) and |
| 321 (self.db.config.MESSAGES_TO_AUTHOR == 'yes' or | 321 (self.db.config.MESSAGES_TO_AUTHOR == 'yes' or |
