summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-12-31 21:17:01 -0500
committerLance Stout <lancestout@gmail.com>2011-12-31 21:17:01 -0500
commit6b6995bb0b80c91eda72bc92974f68133cef93a3 (patch)
treef4d2ceaa271092ef54ec7de99f1a0ca802e4d1f2
parent27c658922e51aaae722880e18878cb2964cb4bd0 (diff)
parent1b0fd76b45bb1c6e6409aa6e3e0b0c2edf5ba374 (diff)
downloadslixmpp-6b6995bb0b80c91eda72bc92974f68133cef93a3.tar.gz
slixmpp-6b6995bb0b80c91eda72bc92974f68133cef93a3.tar.bz2
slixmpp-6b6995bb0b80c91eda72bc92974f68133cef93a3.tar.xz
slixmpp-6b6995bb0b80c91eda72bc92974f68133cef93a3.zip
Merge branch 'develop' into develop-1.1
-rwxr-xr-xexamples/adhoc_provider.py1
-rwxr-xr-xexamples/adhoc_user.py1
-rwxr-xr-xexamples/disco_browser.py1
-rwxr-xr-xexamples/echo_client.py1
-rwxr-xr-xexamples/echo_component.py2
-rwxr-xr-xexamples/muc.py13
-rwxr-xr-xexamples/ping.py1
-rwxr-xr-xexamples/proxy_echo_client.py1
-rw-r--r--examples/roster_browser.py1
-rwxr-xr-xexamples/send_client.py1
10 files changed, 10 insertions, 13 deletions
diff --git a/examples/adhoc_provider.py b/examples/adhoc_provider.py
index 4d4c3610..cfe72755 100755
--- a/examples/adhoc_provider.py
+++ b/examples/adhoc_provider.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser
diff --git a/examples/adhoc_user.py b/examples/adhoc_user.py
index 0bc03c15..c155d4b8 100755
--- a/examples/adhoc_user.py
+++ b/examples/adhoc_user.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser
diff --git a/examples/disco_browser.py b/examples/disco_browser.py
index 6023dd7e..20d012bc 100755
--- a/examples/disco_browser.py
+++ b/examples/disco_browser.py
@@ -10,7 +10,6 @@
"""
import sys
-import time
import logging
import getpass
from optparse import OptionParser
diff --git a/examples/echo_client.py b/examples/echo_client.py
index cbb04683..db0064f9 100755
--- a/examples/echo_client.py
+++ b/examples/echo_client.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser
diff --git a/examples/echo_component.py b/examples/echo_component.py
index d8bcd752..82f6eb9f 100755
--- a/examples/echo_component.py
+++ b/examples/echo_component.py
@@ -11,7 +11,7 @@
import sys
import logging
-import time
+import getpass
from optparse import OptionParser
import sleekxmpp
diff --git a/examples/muc.py b/examples/muc.py
index 7af37449..7586c61c 100755
--- a/examples/muc.py
+++ b/examples/muc.py
@@ -11,7 +11,7 @@
import sys
import logging
-import time
+import getpass
from optparse import OptionParser
import sleekxmpp
@@ -161,9 +161,14 @@ if __name__ == '__main__':
logging.basicConfig(level=opts.loglevel,
format='%(levelname)-8s %(message)s')
- if None in [opts.jid, opts.password, opts.room, opts.nick]:
- optp.print_help()
- sys.exit(1)
+ if opts.jid is None:
+ opts.jid = raw_input("Username: ")
+ if opts.password is None:
+ opts.password = getpass.getpass("Password: ")
+ if opts.room is None:
+ opts.room = raw_input("MUC room: ")
+ if opts.nick is None:
+ opts.nick = raw_input("MUC nickname: ")
# Setup the MUCBot and register plugins. Note that while plugins may
# have interdependencies, the order in which you register them does
diff --git a/examples/ping.py b/examples/ping.py
index 81194eef..8630b321 100755
--- a/examples/ping.py
+++ b/examples/ping.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser
diff --git a/examples/proxy_echo_client.py b/examples/proxy_echo_client.py
index 1f4ba9d3..6655ec59 100755
--- a/examples/proxy_echo_client.py
+++ b/examples/proxy_echo_client.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser
diff --git a/examples/roster_browser.py b/examples/roster_browser.py
index 7926b096..7e7ec816 100644
--- a/examples/roster_browser.py
+++ b/examples/roster_browser.py
@@ -10,7 +10,6 @@
"""
import sys
-import time
import logging
import getpass
import threading
diff --git a/examples/send_client.py b/examples/send_client.py
index 94bb584d..adf5fcc6 100755
--- a/examples/send_client.py
+++ b/examples/send_client.py
@@ -11,7 +11,6 @@
import sys
import logging
-import time
import getpass
from optparse import OptionParser