Commit 7509fb00 authored by louiz’'s avatar louiz’

Prompt password if no password is provided in config file

parent c94be476
......@@ -28,6 +28,7 @@ default_nick =
jid =
# A password is needed only if you specified a jid. It will be ignored otherwise
# If you leave this empty, the password will be asked at each startup
password =
# the rooms you will join automatically on startup, with associated nickname or not
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment