Kaydet (Commit) f74e46cf authored tarafından Neal Norwitz's avatar Neal Norwitz

Derive exception classes from Exception

üst 27a35302
...@@ -47,7 +47,7 @@ def main(): ...@@ -47,7 +47,7 @@ def main():
for arg in args: for arg in args:
check(arg) check(arg)
class NannyNag: class NannyNag(Exception):
def __init__(self, lineno, msg, line): def __init__(self, lineno, msg, line):
self.lineno, self.msg, self.line = lineno, msg, line self.lineno, self.msg, self.line = lineno, msg, line
def get_lineno(self): def get_lineno(self):
......
...@@ -13,7 +13,7 @@ except ImportError: ...@@ -13,7 +13,7 @@ except ImportError:
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"] __all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
# exceptions # exceptions
class Error: class Error(Exception):
"""Exception class for this module. Use: """Exception class for this module. Use:
except xdrlib.Error, var: except xdrlib.Error, var:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment