From 1b5b5deb44940f46dd323a96744cee5cd5fa7135 Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Mon, 8 Nov 2004 19:46:52 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Committing in . Modified Files: Utility.py -- removed "sw" property in ElementProxy. ---------------------------------------------------------------------- --- Utility.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Utility.py b/Utility.py index 96f7231..7bb2a81 100755 --- a/Utility.py +++ b/Utility.py @@ -620,22 +620,20 @@ class MessageInterface: '''Constructor, May be extended, do not override. sw -- soapWriter instance ''' - self.sw = sw - - def getSoapWriter(self, sw): - return self._sw() - def setSoapWriter(self, sw): - self._sw = weakref.ref(sw) - sw = property(getSoapWriter, setSoapWriter, None, "soap writer instance.") + self.sw = None + if type(sw) != weakref.ReferenceType and sw is not None: + self.sw = weakref.ref(sw) + else: + self.sw = sw def AddCallback(self, func, *arglist): - self.sw.AddCallback(func, *arglist) + self.sw().AddCallback(func, *arglist) def Known(self, obj): - return self.sw.Known(obj) + return self.sw().Known(obj) def Forget(self, obj): - return self.sw.Forget(obj) + return self.sw().Forget(obj) def canonicalize(self): '''canonicalize the underlying DOM, and return as string.