Different kinds of Import Errors

kyosohma at gmail.com kyosohma at gmail.com
Tue Nov 27 17:26:14 EST 2007


On Nov 27, 3:50 pm, a... at pythoncraft.com (Aahz) wrote:
> In article <a07cf37e-fd55-4bd2-a5f7-296abcee4... at s8g2000prg.googlegroups.com>,
>
>  <kyoso... at gmail.com> wrote:
>
> ># untested
> >args = exc.args[0]
> >if args.find('management') != -1:
> >    raise
>
> YM
>
> if 'management' in args:
>     raise
>
> HTH, HAND  ;-)
> --
> Aahz (a... at pythoncraft.com)           <*>        http://www.pythoncraft.com/
>
> "Typing is cheap.  Thinking is expensive."  --Roy Smith

Oops...I've used this method myself. Your method is definitely nicer
and likelier more "Pythonic" than mine. Live and learn.

Mike



More information about the Python-list mailing list