Use repr() on the filename in EnvironmentError.__str__().  This
displays funny characters, like spaces or control characters, more
clearly (one of my pet peeves in error messages).  Also only suppress
the filename if it is None; display it if it is '', since that would
be a genuine (illegal) filename passed in!
1 file changed