comparison roundup/xmlrpc.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
138 # convert types 138 # convert types
139 props = props_from_args(self.db, cl, args) 139 props = props_from_args(self.db, cl, args)
140 140
141 # check for the key property 141 # check for the key property
142 key = cl.getkey() 142 key = cl.getkey()
143 if key and not props.has_key(key): 143 if key and key not in props:
144 raise UsageError('you must provide the "%s" property.'%key) 144 raise UsageError('you must provide the "%s" property.'%key)
145 145
146 for key in props: 146 for key in props:
147 if not self.db.security.hasPermission('Create', self.db.getuid(), 147 if not self.db.security.hasPermission('Create', self.db.getuid(),
148 classname, property=key): 148 classname, property=key):

Roundup Issue Tracker: http://roundup-tracker.org/