fixed manual address definition

This commit is contained in:
Nathan Fritz 2011-08-18 00:59:27 -07:00
parent cd7cd30b4c
commit fb78bf0996
2 changed files with 3 additions and 2 deletions

View file

@ -143,7 +143,7 @@ if __name__ == '__main__':
format='%(levelname)-8s %(message)s') format='%(levelname)-8s %(message)s')
if opts.jid is None: if opts.jid is None:
opts.jid = input("Username: ") opts.jid = raw_input("Username: ")
if opts.password is None: if opts.password is None:
opts.password = getpass.getpass("Password: ") opts.password = getpass.getpass("Password: ")

View file

@ -134,6 +134,7 @@ class ClientXMPP(BaseXMPP):
connection. Defaults to True. connection. Defaults to True.
""" """
self.session_started_event.clear() self.session_started_event.clear()
if not address:
address = (self.boundjid.host, 5222) address = (self.boundjid.host, 5222)
return XMLStream.connect(self, address[0], address[1], return XMLStream.connect(self, address[0], address[1],