[muji/master] support getting the password via getpass.getpass

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Tue Jan 5 03:24:25 PST 2010


---
 multi-jingle-client.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/multi-jingle-client.py b/multi-jingle-client.py
index 9a3e9a4..bb1794a 100644
--- a/multi-jingle-client.py
+++ b/multi-jingle-client.py
@@ -478,10 +478,16 @@ def run(jid, password, muc_jid, peers):
     reactor.run()
 
 def main(argv):
-    if len(argv) != 4:
+    if len(argv) not in (3,4):
         return 1
 
-    jid_str, password, muc_str = argv[1:]
+    try:
+        jid_str, password, muc_str = argv[1:]
+    except:
+        jid_str, muc_str = argv[1:]
+        import getpass
+        password = getpass.getpass('Passs for %s:'%jid_str)
+
     muc_jid = JID(muc_str)
     #peers = map(JID, argv[3:])
     #print (jid, password, peers)
-- 
1.5.6.5



More information about the telepathy-commits mailing list