2017-01-10 | Paul Boddie | raw files shortlog changelog graph | Improved the string representation of OSError. | |
lib/__builtins__/exception/system.py (file) |
1.1 --- a/lib/__builtins__/exception/system.py Tue Jan 10 18:21:00 2017 +0100 1.2 +++ b/lib/__builtins__/exception/system.py Tue Jan 10 18:47:33 2017 +0100 1.3 @@ -32,6 +32,11 @@ 1.4 self.value = value 1.5 self.arg = arg 1.6 1.7 + def __str__(self): 1.8 + return str(buffer(["OSError(", repr(self.value), ", ", repr(self.arg), ")"])) 1.9 + 1.10 + __repr__ = __str__ 1.11 + 1.12 class RuntimeError(Exception): pass 1.13 class RuntimeWarning(Warning): pass 1.14 class SystemError(Exception): pass