> > According to the EnvironmentError exception's description, it's possible > > that errno won't be set. > > > > http://www.python.org/doc/2.4.4/lib/module-exceptions.html > > I read that as the member will always be there, just sometimes set to None, > in which case > > if isinstance(__e, EnvironmentError) and __e.errno != errno.ENOMEM: > raise > > ... > > should work, no?
Yes, this looks like it should work. I double-checked the __init__ method for EnvironmentError, and it always has args, errno, strerror, and filename as attributes. Sometimes, though, those attributes are set to none. Python/exceptions.c:469 in Python 2.4.4 for the gory details. -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
