added logging to smp adapter
This commit is contained in:
@@ -49,12 +49,14 @@ class SMP(TelnetAdapter, RecorderAdapter):
|
||||
print(out[1])
|
||||
if "Password:" in out[1]:
|
||||
# TODO: loop until logged in...
|
||||
logger.warning("Could not login (as admin) with given password! {}".format(self.address))
|
||||
print("re-enter pw")
|
||||
self.tn.write(self.admin_pw+"\n\r")
|
||||
print(self.tn.assert_string_in_output("Login Administrator"))
|
||||
print("WRONG (admin) password!! Exiting!")
|
||||
print(self.admin_pw)
|
||||
self.tn = None
|
||||
logger.error("Could definitely not login (as admin) with given password! {}".format(self.address))
|
||||
raise Exception("Could not login as administrator with given pw!")
|
||||
print("OK, we have admin rights!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user