Skip to content

Commit

Permalink
Updated usage message
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre St Juste committed Jul 18, 2011
1 parent f8af4c9 commit ba5be4d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/litter.py
Expand Up @@ -337,6 +337,9 @@ def stop(self):
self.rqueue.put((None, None))


def usage():
print "usage: ./litter.py [-i intf] [-n name]"

def main():

dev = "tapipop"
Expand All @@ -345,16 +348,17 @@ def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "i:n:")
except getopt.GetoptError, err:
print "usage: ./litter.py -i intf -n name"
usage()
sys.exit()

for o, a in opts:
if o == "-i":
dev = a
elif o == "-n":
name = a
else:
assert False, "unhandled option"

usage()
sys.exit()

intf = MulticastServer.get_ip_address(dev)
queue = Queue.Queue()
Expand Down

0 comments on commit ba5be4d

Please sign in to comment.