summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2014-08-17 21:53:34 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-09-01 02:47:15 +0200
commit17174016ec6603afe87a65282f9b7eb55f2eafeb (patch)
tree1e815d4ab942bf3b8ac932d3a1213b7a00659e26 /examples
parented37174a2b40d2d90aa6a0c7f778108687d39602 (diff)
downloadslixmpp-17174016ec6603afe87a65282f9b7eb55f2eafeb.tar.gz
slixmpp-17174016ec6603afe87a65282f9b7eb55f2eafeb.tar.bz2
slixmpp-17174016ec6603afe87a65282f9b7eb55f2eafeb.tar.xz
slixmpp-17174016ec6603afe87a65282f9b7eb55f2eafeb.zip
Remove all trailing whitespaces.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/custom_stanzas/custom_stanza_user.py2
-rw-r--r--examples/custom_stanzas/stanza.py8
-rwxr-xr-xexamples/thirdparty_auth.py10
-rwxr-xr-xexamples/user_location.py2
4 files changed, 11 insertions, 11 deletions
diff --git a/examples/custom_stanzas/custom_stanza_user.py b/examples/custom_stanzas/custom_stanza_user.py
index 4e8337f2..66bad523 100755
--- a/examples/custom_stanzas/custom_stanza_user.py
+++ b/examples/custom_stanzas/custom_stanza_user.py
@@ -82,7 +82,7 @@ class ActionUserBot(slixmpp.ClientXMPP):
iq2['type'] = 'set'
iq2['action']['method'] = 'bye'
iq2.send(block=False)
-
+
# The wait=True delays the disconnect until the queue
# of stanzas to be sent becomes empty.
self.disconnect(wait=True)
diff --git a/examples/custom_stanzas/stanza.py b/examples/custom_stanzas/stanza.py
index ba109b06..b2c6f766 100644
--- a/examples/custom_stanzas/stanza.py
+++ b/examples/custom_stanzas/stanza.py
@@ -11,7 +11,7 @@ class Action(ElementBase):
<status>X</status>
</action>
"""
-
+
#: The `name` field refers to the basic XML tag name of the
#: stanza. Here, the tag name will be 'action'.
name = 'action'
@@ -22,9 +22,9 @@ class Action(ElementBase):
#: The `plugin_attrib` value is the name that can be used
#: with a parent stanza to access this stanza. For example
#: from an Iq stanza object, accessing:
- #:
+ #:
#: iq['action']
- #:
+ #:
#: would reference an Action object, and will even create
#: an Action object and append it to the Iq stanza if
#: one doesn't already exist.
@@ -49,7 +49,7 @@ class Action(ElementBase):
#: the sub_interfaces set. For example, here all interfaces
#: are marked as sub_interfaces, and so the XML produced will
#: look like:
- #:
+ #:
#: <action xmlns="slixmpp:custom:actions">
#: <method>foo</method>
#: </action>
diff --git a/examples/thirdparty_auth.py b/examples/thirdparty_auth.py
index 9318854b..4129fa91 100755
--- a/examples/thirdparty_auth.py
+++ b/examples/thirdparty_auth.py
@@ -121,7 +121,7 @@ if __name__ == '__main__':
if args.password is None:
args.password = getpass("Password: ")
-
+
access_token = None
# Since documentation on how to work with Google tokens
@@ -147,7 +147,7 @@ if __name__ == '__main__':
'Passwd': args.password
})
headers = {
- 'Content-Type': 'application/x-www-form-urlencoded'
+ 'Content-Type': 'application/x-www-form-urlencoded'
}
try:
conn.request('POST', '/accounts/ClientLogin', params, headers)
@@ -195,12 +195,12 @@ if __name__ == '__main__':
# We're using an access token instead of a password, so we'll use `''` as
# a password argument filler.
- xmpp = ThirdPartyAuthBot(args.jid, '')
+ xmpp = ThirdPartyAuthBot(args.jid, '')
xmpp.credentials['access_token'] = access_token
# The credentials dictionary is used to provide additional authentication
# information beyond just a password.
-
+
xmpp.register_plugin('xep_0030') # Service Discovery
xmpp.register_plugin('xep_0004') # Data Forms
xmpp.register_plugin('xep_0060') # PubSub
@@ -218,7 +218,7 @@ if __name__ == '__main__':
# xmpp.ca_certs = "path/to/ca/cert"
# Connect to the XMPP server and start processing XMPP stanzas.
- # Google only allows one SASL attempt per connection, so in order to
+ # Google only allows one SASL attempt per connection, so in order to
# enable the X-GOOGLE-TOKEN mechanism, we'll disable TLS.
xmpp.connect()
xmpp.process()
diff --git a/examples/user_location.py b/examples/user_location.py
index 8840ec85..5a30f7af 100755
--- a/examples/user_location.py
+++ b/examples/user_location.py
@@ -25,7 +25,7 @@ class LocationBot(ClientXMPP):
super(LocationBot, self).__init__(jid, password)
self.add_event_handler('session_start', self.start)
- self.add_event_handler('user_location_publish',
+ self.add_event_handler('user_location_publish',
self.user_location_publish)
self.register_plugin('xep_0004')