ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 33 forks source link

Also check stdout is a tty when requiring interactive credentials #256

Closed sbesson closed 3 years ago

sbesson commented 3 years ago

Fixes https://github.com/IDR/idr-utils/issues/27

Can be tested with the following minimal workflow

omero logout # ensure no session is active
omero login > out # should fail with an error message
omero login # enter valid credentials
omero login > out # should re-use the existing session
sbesson commented 3 years ago

As suggested by 606f9fc, one downside of failing in sessions login when stdout is not a tty is tests can no longer simply use pytest capsys fixture to test scenarios where additional input to the CLI control is required. I expect most (if not all) integration tests should be unaffected by this change.

dominikl commented 3 years ago

That's good, thanks Seb 👍 Often I've been running omero something >> out.log just to discover later that it's been sitting there and waiting for credentials.

sbesson commented 3 years ago

Should I go ahead and start the process of releasing this as omero-py 5.8.2 or is anything else planned?

manics commented 3 years ago

I'm not aware of anything, maybe check in standup tomorrow?