Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Tanner Prestegard
lvalert
Commits
ec28bc29
Verified
Commit
ec28bc29
authored
Feb 25, 2019
by
Tanner Prestegard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try to process .netrc file if username and password are both provided to LVAlertClient
parent
c501b07c
Pipeline
#50585
passed with stages
in 3 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ligo/lvalert/__init__.py
ligo/lvalert/__init__.py
+5
-3
No files found.
ligo/lvalert/__init__.py
View file @
ec28bc29
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment