summaryrefslogtreecommitdiff
path: root/python/test/Ice/admin/TestI.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Ice/admin/TestI.py')
-rw-r--r--python/test/Ice/admin/TestI.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/python/test/Ice/admin/TestI.py b/python/test/Ice/admin/TestI.py
index f1e6e0b49d5..c040ffbef59 100644
--- a/python/test/Ice/admin/TestI.py
+++ b/python/test/Ice/admin/TestI.py
@@ -27,8 +27,7 @@ class RemoteCommunicatorI(Test.RemoteCommunicator, Ice.PropertiesAdminUpdateCall
return self.communicator.getAdmin()
def getChanges(self, current = None):
- self.m.acquire()
- try:
+ with self.m:
#
# The client calls PropertiesAdmin::setProperties() and then invokes
# this operation. Since setProperties() is implemented using AMD, the
@@ -42,8 +41,6 @@ class RemoteCommunicatorI(Test.RemoteCommunicator, Ice.PropertiesAdminUpdateCall
self.called = False
return self.changes
- finally:
- self.m.release()
def shutdown(self, current = None):
self.communicator.shutdown()
@@ -59,13 +56,10 @@ class RemoteCommunicatorI(Test.RemoteCommunicator, Ice.PropertiesAdminUpdateCall
self.communicator.destroy()
def updated(self, changes):
- self.m.acquire()
- try:
+ with self.m:
self.changes = changes
self.called = True
self.m.notify()
- finally:
- self.m.release()
class RemoteCommunicatorFactoryI(Test.RemoteCommunicatorFactory):