diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-04-24 14:16:15 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-04-24 14:16:15 -0700 |
commit | 943a48fc5c0a59b892eb746073c71b8dd88815e7 (patch) | |
tree | 421cfedbc60603d02e0b314d9204e9f85dd781c5 /py/demo/book/simple_filesystem/Server.py | |
parent | minor fix to IcePHP getLogger (diff) | |
download | ice-943a48fc5c0a59b892eb746073c71b8dd88815e7.tar.bz2 ice-943a48fc5c0a59b892eb746073c71b8dd88815e7.tar.xz ice-943a48fc5c0a59b892eb746073c71b8dd88815e7.zip |
python 3 support
Diffstat (limited to 'py/demo/book/simple_filesystem/Server.py')
-rwxr-xr-x | py/demo/book/simple_filesystem/Server.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py/demo/book/simple_filesystem/Server.py b/py/demo/book/simple_filesystem/Server.py index 14561ca1fa0..266f3a39667 100755 --- a/py/demo/book/simple_filesystem/Server.py +++ b/py/demo/book/simple_filesystem/Server.py @@ -94,7 +94,7 @@ class Server(Ice.Application): # Create an object adapter # adapter = self.communicator().createObjectAdapterWithEndpoints( - "SimpleFileSystem", "default -h localhost -p 10000") + "SimpleFileSystem", "default -h localhost -p 10000") # Create the root directory (with name "/" and no parent) # @@ -107,8 +107,8 @@ class Server(Ice.Application): text = [ "This file system contains a collection of poetry." ] try: file.write(text) - except Filesystem.GenericError, e: - print e.reason + except Filesystem.GenericError as e: + print(e.reason) file.activate(adapter) # Create a directory called "Coleridge" in the root directory @@ -126,8 +126,8 @@ class Server(Ice.Application): "Down to a sunless sea." ] try: file.write(text) - except Filesystem.GenericError, e: - print e.reason + except Filesystem.GenericError as e: + print(e.reason) file.activate(adapter) # All objects are created, allow client requests now @@ -139,7 +139,7 @@ class Server(Ice.Application): self.communicator().waitForShutdown() if self.interrupted(): - print self.appName() + ": terminating" + print(self.appName() + ": terminating") return 0 |