Commit 13a9e406 authored by Alexander Pace's avatar Alexander Pace

Merge branch 'master' into 'master'

Don't try to process .netrc file if username and password are both provided to LVAlertClient

See merge request !18
parents c501b07c ec28bc29
Pipeline #50848 passed with stages
in 4 minutes and 24 seconds
......@@ -67,12 +67,14 @@ def _get_default_login(netrcfile, server):
def _get_login(username, password, netrc, interactive, server):
# Return right away if username and password are both provided
if username is not None and password is not None:
return username, password
default_username, default_password = _get_default_login(netrc, server)
prompt = 'password for {}@{}: '.format(username, server)
if username is not None and password is not None:
return username, password
elif username is None and default_username is None:
if username is None and default_username is None:
raise RuntimeError('Username not specified')
elif username is None or username == default_username:
return default_username, default_password
......
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