diff options
Diffstat (limited to 'py/python')
-rw-r--r-- | py/python/Ice.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/py/python/Ice.py b/py/python/Ice.py index 608fc52d177..e0e850dab9a 100644 --- a/py/python/Ice.py +++ b/py/python/Ice.py @@ -178,7 +178,6 @@ class InitializationData(object): self.properties = None self.logger = None #self.stats = None # Stats not currently supported in Python. - self.defaultContext = {} self.threadHook = None # @@ -240,6 +239,9 @@ class CommunicatorI(Communicator): def getDefaultContext(self): return self._impl.getDefaultContext() + def getImplicitContext(self): + return ImplicitContextI(self._impl.getImplicitContext()) + def getProperties(self): properties = self._impl.getProperties() return PropertiesI(properties) @@ -476,6 +478,32 @@ def createProperties(args=[], defaults=None): # +# ImplicitContext wrapper +# +class ImplicitContextI(ImplicitContext): + def __init__(self, impl): + self._impl = impl + + def setContext(self, ctx): + self._impl.setContext(ctx) + + def getContext(self): + return self._impl.getContext(); + + def set(self, key, value): + self._impl.set(key, value); + + def remove(self, key): + self._impl.remove(key); + + def get(self, key): + return self._impl.get(key); + + def getWithDefault(self, key, dflt): + return self._impl.getWithDefault(key, dflt); + + +# # The variables below need to be global in order to properly reference a # static method of Application. # |