summaryrefslogtreecommitdiff
path: root/python/test/Ice/slicing/objects/ServerAMD.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test/Ice/slicing/objects/ServerAMD.py')
-rwxr-xr-xpython/test/Ice/slicing/objects/ServerAMD.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/test/Ice/slicing/objects/ServerAMD.py b/python/test/Ice/slicing/objects/ServerAMD.py
index 1f925613b6b..1839a9f6480 100755
--- a/python/test/Ice/slicing/objects/ServerAMD.py
+++ b/python/test/Ice/slicing/objects/ServerAMD.py
@@ -412,13 +412,10 @@ def run(args, communicator):
return True
try:
- communicator = Ice.initialize(sys.argv)
- status = run(sys.argv, communicator)
+ with Ice.initialize(sys.argv) as communicator:
+ status = run(sys.argv, communicator)
except:
traceback.print_exc()
status = False
-if communicator:
- communicator.destroy()
-
sys.exit(not status)