Add login success print test
This commit is contained in:
parent
b0457865d6
commit
a374ec73b4
4
auth.py
4
auth.py
@ -16,7 +16,8 @@ def login(config, user, password, sysid):
|
||||
ssh.run_ssh(config, command, 'scripts')
|
||||
sleep(1)
|
||||
filename = sysid + "success.txt"
|
||||
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
||||
output = ssh.check_for_file(config, filename, 'receivelogin')
|
||||
if output == False:
|
||||
filename = sysid + "fail.txt"
|
||||
if ssh.check_for_file(config, filename, 'receivelogin') == False:
|
||||
raise ValueError("Unable to determine login status")
|
||||
@ -24,3 +25,4 @@ def login(config, user, password, sysid):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
fprint(output)
|
Loading…
x
Reference in New Issue
Block a user