X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/blobdiff_plain/332ec7faf5d492bee4940162e5b578128dea70c5..76b00ab5bf3750a131294674c402ee17930b4309:/afs/pts.py diff --git a/afs/pts.py b/afs/pts.py index 9c44f3a..4d3e17c 100644 --- a/afs/pts.py +++ b/afs/pts.py @@ -45,7 +45,8 @@ class PTRelationSet(collections.MutableSet): Args: elt: The element to add. """ - self._set.add(self._ent._pts.getEntry(elt)) + if hasattr(self, '_set'): + self._set.add(self._ent._pts.getEntry(elt)) def _discard(self, elt): """Remove a PTEntry to this instance's internal representation. @@ -57,7 +58,8 @@ class PTRelationSet(collections.MutableSet): Args: elt: The element to discard. """ - self._set.discard(self._ent._pts.getEntry(elt)) + if hasattr(self, '_set'): + self._set.discard(self._ent._pts.getEntry(elt)) def __len__(self): """Count the members/groups in this set.