From 7509fb00021a0c550cee91d2feb27c1137dde916 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 13 Jan 2011 23:20:17 +0100 Subject: Prompt password if no password is provided in config file --- src/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/connection.py b/src/connection.py index d29fec82..d1de40d6 100644 --- a/src/connection.py +++ b/src/connection.py @@ -25,6 +25,7 @@ from gettext import (bindtextdomain, textdomain, bind_textdomain_codeset, gettext as _) import sys +import getpass import sleekxmpp from config import config @@ -43,7 +44,7 @@ class Connection(sleekxmpp.ClientXMPP): # many features will be handled diferently # depending on this setting jid = '%s/%s' % (config.get('jid', ''), resource) - password = config.get('password', '') + password = config.get('password', '') or getpass.getpass() else: # anonymous auth self.anon = True jid = '%s/%s' % (config.get('server', 'anon.louiz.org'), resource) -- cgit v1.2.3