diff options
Diffstat (limited to 'python/test/Ice/enums/Server.py')
-rwxr-xr-x | python/test/Ice/enums/Server.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/python/test/Ice/enums/Server.py b/python/test/Ice/enums/Server.py index 8f9559a83bc..93f27f861c0 100755 --- a/python/test/Ice/enums/Server.py +++ b/python/test/Ice/enums/Server.py @@ -18,7 +18,7 @@ def test(b): if not b: raise RuntimeError('test assertion failed') -class TestIntfI(Test.TestIntf): +class TestIntfI(Test._TestIntfDisp): def opByte(self, b1, current=None): return (b1, b1) @@ -50,23 +50,16 @@ def run(args, communicator): communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010") adapter = communicator.createObjectAdapter("TestAdapter") object = TestIntfI() - adapter.add(object, communicator.stringToIdentity("test")) + adapter.add(object, Ice.stringToIdentity("test")) adapter.activate() communicator.waitForShutdown() 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: - try: - communicator.destroy() - except: - traceback.print_exc() - status = False - sys.exit(not status) |