ayust / kitnirc

Python IRC bot framework.
MIT License
11 stars 7 forks source link

Report reason for failure to load module. #10

Open relsqui opened 10 years ago

relsqui commented 10 years ago

It would be nice if, when a module load fails, kitnbot replied with the reason attached to the ImportError. (I can write this myself, just posting an issue since I'm not going to get around to it right now.)

ayust commented 10 years ago

Hm. I think the current behavior (correct me if I'm wrong) is to output the error to the log, but not say anything in any channels? The reasoning being that we don't want to leak details of bot code to the general public, so the log is a "better" place for that - debugging details belong there, not in IRC channels.

That said, it wouldn't be all that hard to add an option e.g. to the admintools module which code could toggle to have it spit out module log failures into IRC somewhere.

ayust commented 10 years ago

Oh hm, no - upon further examination of the code, it looks like we swallow the ImportError even in the logs right now. Yeah, that can probably be changed. ImportErrors are sometimes notoriously misleading, but even some info is better than none.