Commit 25d6b6ff authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Respect command line --resource arg verbatim (default is random)

parent 3da71418
......@@ -98,7 +98,7 @@ parser.add_option("-a","--username",action="store",type="string",\
parser.add_option("-c","--server",action="store",type="string",\
default="lvalert.cgca.uwm.edu", help="the pubsub server" )
parser.add_option("-r","--resource",action="store",type="string",\
default="admin", help="resource to use in JID" )
default=uuid.uuid4().hex, help="resource to use in JID [default: random]" )
parser.add_option("--netrc", "-N",
help="Load username and password from this file",
default=os.environ.get('NETRC', '~/.netrc'))
......@@ -254,7 +254,7 @@ libxml2.debugMemory(1)
# set up the stream
# append UUID to resource to guarantee that it is non-empty and unique
myjid=JID(myusername+"@"+opts.server+"/"+opts.resource+uuid.uuid4().hex)
myjid=JID(myusername+"@"+opts.server+"/"+opts.resource)
s=MyClient(jid=myjid,password=mypassword)
if opts.verbose:
......
......@@ -123,7 +123,7 @@ parser.add_option("-a","--username",action="store",type="string",\
parser.add_option("-s","--server",action="store",type="string",\
default="lvalert.cgca.uwm.edu", help="the pubsub server" )
parser.add_option("-r","--resource",action="store",type="string",\
default="listener", help="resource to use in JID" )
default=uuid.uuid4().hex, help="resource to use in JID [default: random]" )
parser.add_option("-c","--config-file",action="store",type="string",\
default=None, help="config file with list of actions" )
parser.add_option("--netrc", "-N",
......@@ -334,7 +334,7 @@ if opts.config_file:
# set up the stream
# append UUID to resource to guarantee that it is non-empty and unique
myjid=JID(myusername+"@"+opts.server+"/"+opts.resource+uuid.uuid4().hex)
myjid=JID(myusername+"@"+opts.server+"/"+opts.resource)
s=MyClient(myjid,mypassword,actions, wait=not opts.dont_wait)
if opts.verbose:
......
......@@ -89,7 +89,7 @@ parser.add_option("-a","--username",action="store",type="string",\
parser.add_option("-s","--server",action="store",type="string",\
default="lvalert.cgca.uwm.edu", help="the pubsub server" )
parser.add_option("-r","--resource",action="store",type="string",\
default="sender", help="resource to use in JID" )
default=uuid.uuid4().hex, help="resource to use in JID [default: random]" )
parser.add_option("--netrc", "-N",
help="Load username and password from this file",
default=os.environ.get('NETRC', '~/.netrc'))
......@@ -245,7 +245,7 @@ libxml2.debugMemory(1)
# Instantiate the client
# append UUID to resource to guarantee that it is non-empty and unique
jid=JID(myusername+"@"+opts.server+"/"+opts.resource+uuid.uuid4().hex)
jid=JID(myusername+"@"+opts.server+"/"+opts.resource)
client = MyClient(jid,mypassword,opts.max_attempts,onStart)
# Connect
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment