From: Evan Broder Date: Wed, 18 Mar 2009 18:01:42 +0000 (-0400) Subject: Kill off the additional message string in pyafs_error - that's what X-Git-Tag: 0.1.0~37 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/commitdiff_plain/08f6a8aabbbcd153085773683b29e6796b3b9767 Kill off the additional message string in pyafs_error - that's what the stack trace is for. Signed-off-by: Evan Broder --- diff --git a/afs/afs.pyx b/afs/afs.pyx index a54a1c9..8f51c16 100644 --- a/afs/afs.pyx +++ b/afs/afs.pyx @@ -7,18 +7,17 @@ import sys cdef int _init = 0 class AFSException(Exception): - def __init__(self, errno, message): + def __init__(self, errno): self.errno = errno self.strerror = afs_error_message(errno) - self.message = message def __repr__(self): - return "AFSException(%s, %s)" % (self.errno, self.message) + return "AFSException(%s)" % (self.errno) def __str__(self): - return "[%s] (%s) while %s" % (self.errno, self.strerror, self.message) + return "[%s] %s" % (self.errno, self.strerror) -def pyafs_error(code, msg): +def pyafs_error(code): if not _init: initialize_ACFG_error_table() initialize_KTC_error_table() @@ -29,4 +28,4 @@ def pyafs_error(code, msg): _init = 1 if code != 0: - raise AFSException(code, msg) + raise AFSException(code)