Skip to content

Commit

Permalink
try to pass format string to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
glyg authored Jul 12, 2021
1 parent 1abfc2c commit cf98939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/omero/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ def assertConnected(func):
@wraps(func)
def wrapped(conn, *args, **kwargs):
if not conn._connected:
raise Ice.ConnectionLostException("Trying to call %s while not connected" % func.__name__)
raise Ice.ConnectionLostException(f"Trying to call {func.__name__} while not connected")

return func(conn, *args, **kwargs)
return wrapped
Expand Down

0 comments on commit cf98939

Please sign in to comment.