Kill off the additional message string in pyafs_error - that's what
[invirt/packages/python-afs.git] / afs / afs.pyx
index a54a1c9..8f51c16 100644 (file)
@@ -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)