summaryrefslogtreecommitdiff
path: root/examples/custom_stanzas
diff options
context:
space:
mode:
Diffstat (limited to 'examples/custom_stanzas')
-rwxr-xr-xexamples/custom_stanzas/custom_stanza_provider.py14
-rwxr-xr-xexamples/custom_stanzas/custom_stanza_user.py14
2 files changed, 4 insertions, 24 deletions
diff --git a/examples/custom_stanzas/custom_stanza_provider.py b/examples/custom_stanzas/custom_stanza_provider.py
index b1b6e0a9..cfc8335d 100755
--- a/examples/custom_stanzas/custom_stanza_provider.py
+++ b/examples/custom_stanzas/custom_stanza_provider.py
@@ -143,15 +143,5 @@ if __name__ == '__main__':
# xmpp.ca_certs = "path/to/ca/cert"
# Connect to the XMPP server and start processing XMPP stanzas.
- if xmpp.connect():
- # If you do not have the dnspython library installed, you will need
- # to manually specify the name of the server if it does not match
- # the one in the JID. For example, to use Google Talk you would
- # need to use:
- #
- # if xmpp.connect(('talk.google.com', 5222)):
- # ...
- xmpp.process(block=True)
- print("Done")
- else:
- print("Unable to connect.")
+ xmpp.connect()
+ xmpp.process()
diff --git a/examples/custom_stanzas/custom_stanza_user.py b/examples/custom_stanzas/custom_stanza_user.py
index af6bf9b3..891eb72b 100755
--- a/examples/custom_stanzas/custom_stanza_user.py
+++ b/examples/custom_stanzas/custom_stanza_user.py
@@ -150,15 +150,5 @@ if __name__ == '__main__':
# xmpp.ca_certs = "path/to/ca/cert"
# Connect to the XMPP server and start processing XMPP stanzas.
- if xmpp.connect():
- # If you do not have the dnspython library installed, you will need
- # to manually specify the name of the server if it does not match
- # the one in the JID. For example, to use Google Talk you would
- # need to use:
- #
- # if xmpp.connect(('talk.google.com', 5222)):
- # ...
- xmpp.process(block=True)
- print("Done")
- else:
- print("Unable to connect.")
+ xmpp.connect()
+ xmpp.process()