summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-09-01 18:21:09 -0400
committerLance Stout <lancestout@gmail.com>2010-09-01 18:21:09 -0400
commit4a2e7c5393da945359edc2648a2ec124481acf7d (patch)
treed1e39ba1a7c7b4eb289095bfaa35b1d98730c593
parent0b4320a19610ab5c3f8d543a4a1ee7969c9e8db6 (diff)
downloadslixmpp-4a2e7c5393da945359edc2648a2ec124481acf7d.tar.gz
slixmpp-4a2e7c5393da945359edc2648a2ec124481acf7d.tar.bz2
slixmpp-4a2e7c5393da945359edc2648a2ec124481acf7d.tar.xz
slixmpp-4a2e7c5393da945359edc2648a2ec124481acf7d.zip
Fixed linespacing and whitespace issues in examples to make them PEP8 compliant.
-rwxr-xr-xexamples/config_component.py12
-rwxr-xr-xexamples/echo_client.py8
2 files changed, 10 insertions, 10 deletions
diff --git a/examples/config_component.py b/examples/config_component.py
index 1850b466..cbb8e628 100755
--- a/examples/config_component.py
+++ b/examples/config_component.py
@@ -24,7 +24,7 @@ from sleekxmpp.xmlstream.stanzabase import ET, registerStanzaPlugin
# by default. To ensure that Unicode is handled properly
# throughout SleekXMPP, we will set the default encoding
# ourselves to UTF-8.
-if sys.version_info < (3,0):
+if sys.version_info < (3, 0):
reload(sys)
sys.setdefaultencoding('utf8')
@@ -147,13 +147,13 @@ if __name__ == '__main__':
optp = OptionParser()
# Output verbosity options.
- optp.add_option('-q','--quiet', help='set logging to ERROR',
+ optp.add_option('-q', '--quiet', help='set logging to ERROR',
action='store_const', dest='loglevel',
const=logging.ERROR, default=logging.INFO)
- optp.add_option('-d','--debug', help='set logging to DEBUG',
+ optp.add_option('-d', '--debug', help='set logging to DEBUG',
action='store_const', dest='loglevel',
const=logging.DEBUG, default=logging.INFO)
- optp.add_option('-v','--verbose', help='set logging to COMM',
+ optp.add_option('-v', '--verbose', help='set logging to COMM',
action='store_const', dest='loglevel',
const=5, default=logging.INFO)
@@ -173,8 +173,8 @@ if __name__ == '__main__':
config = Config(xml=ET.fromstring(config_data))
config_file.close()
- # Setup the ConfigComponent and register plugins. Note that while plugins may
- # have interdependencies, the order in which you register them does
+ # Setup the ConfigComponent and register plugins. Note that while plugins
+ # may have interdependencies, the order in which you register them does
# not matter.
xmpp = ConfigComponent(config)
xmpp.registerPlugin('xep_0030') # Service Discovery
diff --git a/examples/echo_client.py b/examples/echo_client.py
index e6266ec4..99967d5f 100755
--- a/examples/echo_client.py
+++ b/examples/echo_client.py
@@ -20,7 +20,7 @@ import sleekxmpp
# by default. To ensure that Unicode is handled properly
# throughout SleekXMPP, we will set the default encoding
# ourselves to UTF-8.
-if sys.version_info < (3,0):
+if sys.version_info < (3, 0):
reload(sys)
sys.setdefaultencoding('utf8')
@@ -83,13 +83,13 @@ if __name__ == '__main__':
optp = OptionParser()
# Output verbosity options.
- optp.add_option('-q','--quiet', help='set logging to ERROR',
+ optp.add_option('-q', '--quiet', help='set logging to ERROR',
action='store_const', dest='loglevel',
const=logging.ERROR, default=logging.INFO)
- optp.add_option('-d','--debug', help='set logging to DEBUG',
+ optp.add_option('-d', '--debug', help='set logging to DEBUG',
action='store_const', dest='loglevel',
const=logging.DEBUG, default=logging.INFO)
- optp.add_option('-v','--verbose', help='set logging to COMM',
+ optp.add_option('-v', '--verbose', help='set logging to COMM',
action='store_const', dest='loglevel',
const=5, default=logging.INFO)