From 08f6a8aabbbcd153085773683b29e6796b3b9767 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Wed, 18 Mar 2009 14:01:42 -0400 Subject: [PATCH] Kill off the additional message string in pyafs_error - that's what the stack trace is for. Signed-off-by: Evan Broder --- afs/afs.pyx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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) -- 1.7.9.5