Examples fixes

This commit is contained in:
Anton Ryzhov 2014-01-21 16:19:27 +04:00
parent 12995e280e
commit cebfd84416
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ if __name__ == '__main__':
# #
# if xmpp.connect(('talk.google.com', 5222)): # if xmpp.connect(('talk.google.com', 5222)):
# ... # ...
xmpp.process(block=False) xmpp.process(block=True)
print("Done") print("Done")
else: else:
print("Unable to connect.") print("Unable to connect.")

View File

@ -37,7 +37,7 @@ class PingTest(sleekxmpp.ClientXMPP):
def __init__(self, jid, password, pingjid): def __init__(self, jid, password, pingjid):
sleekxmpp.ClientXMPP.__init__(self, jid, password) sleekxmpp.ClientXMPP.__init__(self, jid, password)
if pingjid is None: if pingjid is None:
pingjid = self.jid pingjid = self.boundjid.bare
self.pingjid = pingjid self.pingjid = pingjid
# The session_start event will be triggered when # The session_start event will be triggered when