In client.createSession() if one of two Exceptions occurs, an informative reason for the exception is captured. However, the value of reason is set to None before it is logged at https://github.com/ome/omero-py/blob/master/src/omero/clients.py#L633. As a result, in log entries, the reason is always None, losing information about the reason for failure of createSession().
In a recent debugging session of a connection timeout, being able to see the reason in the log would have been very helpful.
@hillan141 thanks for the feedback and agreed. As things stands reason is unnecessarily reset to None on each retry. I opened #353 to propose the change you suggested for inclusion in the next OMERO.py release
Thanks for supporting omero.
https://github.com/ome/omero-py/blob/master/src/omero/clients.py#L631
In
client.createSession()
if one of two Exceptions occurs, an informativereason
for the exception is captured. However, the value ofreason
is set to None before it is logged at https://github.com/ome/omero-py/blob/master/src/omero/clients.py#L633. As a result, in log entries, thereason
is alwaysNone
, losing information about the reason for failure ofcreateSession()
.In a recent debugging session of a connection timeout, being able to see the
reason
in the log would have been very helpful.Suggestion: move assignment of
reason
at https://github.com/ome/omero-py/blob/master/src/omero/clients.py#L631 up a line so that it is outside thewhile()
loop.