# HG changeset patch # User Paul Boddie # Date 1484070453 -3600 # Node ID 4aed2292f1d4461c5d8f2d443613ed51013c6aba # Parent a367d172b01e1e518634554b721e1b1e8171c31c Improved the string representation of OSError. diff -r a367d172b01e -r 4aed2292f1d4 lib/__builtins__/exception/system.py --- a/lib/__builtins__/exception/system.py Tue Jan 10 18:21:00 2017 +0100 +++ b/lib/__builtins__/exception/system.py Tue Jan 10 18:47:33 2017 +0100 @@ -32,6 +32,11 @@ self.value = value self.arg = arg + def __str__(self): + return str(buffer(["OSError(", repr(self.value), ", ", repr(self.arg), ")"])) + + __repr__ = __str__ + class RuntimeError(Exception): pass class RuntimeWarning(Warning): pass class SystemError(Exception): pass