# HG changeset patch # User Paul Boddie # Date 1481499213 -3600 # Node ID 4a9521f666e96808dfc05507f9d6c18cd2510f45 # Parent 333e1b23f4e47f6d4990de9f81a2a65dbc1b8376 Added attributes to OSError instances. diff -r 333e1b23f4e4 -r 4a9521f666e9 lib/__builtins__/exception/system.py --- a/lib/__builtins__/exception/system.py Sun Dec 11 18:33:09 2016 +0100 +++ b/lib/__builtins__/exception/system.py Mon Dec 12 00:33:33 2016 +0100 @@ -20,7 +20,18 @@ """ class EnvironmentError(Exception): pass -class OSError(Exception): pass + +class OSError(Exception): + + "A general operating system error." + + def __init__(self, value, arg): + + "Initialise the exception with the given error 'value' and 'arg'." + + self.value = value + self.arg = arg + class RuntimeError(Exception): pass class RuntimeWarning(Warning): pass class SystemError(Exception): pass