Store the cell name in the PTS object.
authorEvan Broder <broder@mit.edu>
Thu, 19 Mar 2009 16:25:29 +0000 (12:25 -0400)
committerEvan Broder <broder@mit.edu>
Thu, 19 Mar 2009 16:25:37 +0000 (12:25 -0400)
Signed-off-by: Evan Broder <broder@mit.edu>

afs/_pts.pyx

index 90b3327..c2465d3 100644 (file)
@@ -134,6 +134,7 @@ cdef class PTS:
         server
     """
     cdef ubik_client * client
+    cdef readonly object cell
 
     def __cinit__(self, cell=None, sec=1):
         cdef afs_int32 code
@@ -167,6 +168,8 @@ cdef class PTS:
         code = afsconf_GetCellInfo(cdir, c_cell, "afsprot", &info)
         pyafs_error(code)
 
+        self.cell = info.name
+
         if sec > 0:
             strncpy(prin.cell, info.name, sizeof(prin.cell))
             prin.instance[0] = 0