ome / omero-py

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

fix logging attribute error #226

Closed tlambert03 closed 4 years ago

tlambert03 commented 4 years ago

one possible solution that fixes #225 but still lets you log from self.ctx if you want. Or just let me know if you want to ditch self.ctx altogether.

joshmoore commented 4 years ago

I'd err on the side of ditching. This class should really have no concept of self.ctx (That's a purely CLI thing.) Looking at this, I think this should also be a warn. The user has requested a timeout, and if that can't be set (or is incorrect) it seems like at least a WARN. (Perhaps the exception should even be thrown, but I'll need to review more for that.)

tlambert03 commented 4 years ago

k, happy to convert to a warn or raise. just let me know.

joshmoore commented 4 years ago

Let's go with a warn and get it released, then I can follow up with the rest.

tlambert03 commented 4 years ago

k, do you want the formatted traceback in the warning?

EDIT: updated with a simple warning. let me know if you want specific info in there

joshmoore commented 4 years ago

Sorry for being a pain, @tlambert03, but can we go back to 2d34519dd2d7338b0bf5e47762ff6c4988653175 and:

tlambert03 commented 4 years ago

ok have another look at your convenience. if you also wanted the self.ctx check added back, lemme know.

joshmoore commented 4 years ago

ok have another look at your convenience.

Awesome, thank you!

if you also wanted the self.ctx check added back, lemme know.

Nah. That should have never happened. :+1: