summaryrefslogtreecommitdiff
path: root/python/test/Ice/blobject/Server.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Ice/blobject/Server.py')
-rwxr-xr-xpython/test/Ice/blobject/Server.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/test/Ice/blobject/Server.py b/python/test/Ice/blobject/Server.py
index cd02c163c36..ad6d43b5b9f 100755
--- a/python/test/Ice/blobject/Server.py
+++ b/python/test/Ice/blobject/Server.py
@@ -47,13 +47,10 @@ try:
# this warning.
#
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
- communicator = Ice.initialize(sys.argv, initData)
- status = run(sys.argv, communicator)
+ with Ice.initialize(sys.argv, initData) as communicator:
+ status = run(sys.argv, communicator)
except:
traceback.print_exc()
status = False
-if communicator:
- communicator.destroy()
-
sys.exit(not status)