mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
pylink: Warn users that configuration is changing. (closes #361)
This commit is contained in:
parent
a57f194123
commit
a173e2a61f
4
conf.py
4
conf.py
@ -52,6 +52,10 @@ def validateConf(conf):
|
||||
assert conf.get(section), "Missing %r section in config." % section
|
||||
|
||||
# Make sure at least one form of authentication is valid.
|
||||
# Also we'll warn them that login:user/login:password is deprecated
|
||||
if conf['login'].get('password') or conf['login'].get('user'):
|
||||
log.warning("The 'login:user' and 'login:password' options are deprecated since PyLink 1.1. Please switch to the new 'login:accounts' format as outlined in the example config.")
|
||||
|
||||
old_login_valid = type(conf['login'].get('password')) == type(conf['login'].get('user')) == str
|
||||
newlogins = conf['login'].get('accounts', {})
|
||||
new_login_valid = len(newlogins) >= 1
|
||||
|
Loading…
Reference in New Issue
Block a user