diff options
author | Matthew Newhook <matthew@zeroc.com> | 2007-02-02 06:35:34 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2007-02-02 06:35:34 +0000 |
commit | 4b692264a0a29e18c554fe68473d78c3d4e48d8a (patch) | |
tree | 366b6fe32b2bb78bb7bd11dbdc66e1a546d2257d /py/demo/IceStorm/clock/Subscriber.py | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1711 (diff) | |
download | ice-4b692264a0a29e18c554fe68473d78c3d4e48d8a.tar.bz2 ice-4b692264a0a29e18c554fe68473d78c3d4e48d8a.tar.xz ice-4b692264a0a29e18c554fe68473d78c3d4e48d8a.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1711
Diffstat (limited to 'py/demo/IceStorm/clock/Subscriber.py')
-rw-r--r-- | py/demo/IceStorm/clock/Subscriber.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/py/demo/IceStorm/clock/Subscriber.py b/py/demo/IceStorm/clock/Subscriber.py index cdf9ae706de..f6ca69635a7 100644 --- a/py/demo/IceStorm/clock/Subscriber.py +++ b/py/demo/IceStorm/clock/Subscriber.py @@ -23,7 +23,7 @@ class Subscriber(Ice.Application): def run(self, args): try: - opts, args = getopt.getopt(args, '', ['datagram', 'twoway', 'oneway']) + opts, args = getopt.getopt(args[1:], '', ['datagram', 'twoway', 'oneway', 'ordered', 'batch']) except getopt.GetoptError: self.usage() return False @@ -33,7 +33,7 @@ class Subscriber(Ice.Application): twoway = False ordered = False batch = False - optsSet = 0; + optsSet = 0 for o, a in opts: if o == "--datagram": datagram = True @@ -57,8 +57,8 @@ class Subscriber(Ice.Application): self.usage() sys.exit(1) - if len(args) > 1: - topicName = args[1] + if len(args) > 0: + topicName = args[0] manager = IceStorm.TopicManagerPrx.checkedCast(\ self.communicator().propertyToProxy('IceStorm.TopicManager.Proxy')) @@ -84,13 +84,13 @@ class Subscriber(Ice.Application): # Add a Servant for the Ice Object. # qos = {} - subscriber = adapter.addWithUUID(ClockI()); + subscriber = adapter.addWithUUID(ClockI()) # # Set up the proxy. # if datagram: - subscriber = subscriber.ice_datagram(); + subscriber = subscriber.ice_datagram() elif twoway: pass # Do nothing to the subscriber proxy. Its already twoway. @@ -98,12 +98,12 @@ class Subscriber(Ice.Application): # Do nothing to the subscriber proxy. Its already twoway. qos["reliability"] = "ordered" else: # if(oneway) - subscriber = subscriber.ice_oneway(); + subscriber = subscriber.ice_oneway() if batch: if datagram: - subscriber = subscriber.ice_batchDatagram(); + subscriber = subscriber.ice_batchDatagram() else: - subscriber = subscriber.ice_batchOneway(); + subscriber = subscriber.ice_batchOneway() topic.subscribeAndGetPublisher(qos, subscriber) adapter.activate() |