diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-01-30 15:13:27 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-01-30 15:13:27 +0100 |
commit | 25fed02adb3fd0d41da3f4dff027e59c424120bc (patch) | |
tree | d701310c3e03b54b5a7d9dc90738e00e35066da7 /python/test/Ice/enums/Client.py | |
parent | slice2cs build failure (diff) | |
download | ice-25fed02adb3fd0d41da3f4dff027e59c424120bc.tar.bz2 ice-25fed02adb3fd0d41da3f4dff027e59c424120bc.tar.xz ice-25fed02adb3fd0d41da3f4dff027e59c424120bc.zip |
Fixed ICE-7493 - Support for java try-with and Python with statements for the Ice.Communicator
Diffstat (limited to 'python/test/Ice/enums/Client.py')
-rwxr-xr-x | python/test/Ice/enums/Client.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/python/test/Ice/enums/Client.py b/python/test/Ice/enums/Client.py index cc50301dbf1..8033ba44588 100755 --- a/python/test/Ice/enums/Client.py +++ b/python/test/Ice/enums/Client.py @@ -20,13 +20,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) |