Closed aherbert closed 3 years ago
Thanks, @aherbert. I've added a label so it should be included in automated testing tomorrow.
Could you provide some testing instructions for this @aherbert ?
From an OMERO cli environment enter this from a python terminal:
import omero
from omero.gateway import BlitzGateway
# Should be an admin or someone who can see a lot of users
conn = BlitzGateway('user', 'password', host='whereever.com')
conn.connect()
for e in conn.findExperimenters():
print(e.id, e.getFullName())
for e in conn.findExperimenters('root'):
print(e.id, e.getFullName())
Currently the method findExperimenters()
will throw an error due to invalid syntax. With the fix it will return all the users or a subset if the optional start
param is used.
@dominikl : did you have any feedback on this?
Without this PR:
>>> for e in conn.findExperimenters():
... print(e.id, e.getFullName())
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/wmoore/Desktop/PY/omero-py/target/omero/gateway/__init__.py", line 3044, in findExperimenters
rv.sort(lambda x, y: cmp(x.omeName.val, y.omeName.val))
TypeError: sort() takes no positional arguments
With this PR it works as expected.
Good to merge 👍
Hi @aherbert. We've started requiring contributors to sign a Contributor License Agreement (CLA). Could you download the CLA form, fill and sign it and return it by email to contributors@openmicroscopy.org. Thanks again for the contribution!
@joshmoore CLA all done.
Thanks!
Add missing
key=
to the sort expression lambda