modem.State does not work :/
This commit is contained in:
parent
dd587d830a
commit
800cf62d04
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ if __name__ == "__main__":
|
||||||
print(status)
|
print(status)
|
||||||
|
|
||||||
# return code: if registered and signal > 0, return 0
|
# return code: if registered and signal > 0, return 0
|
||||||
if modem.State in [ MM_MODEM_STATE_REGISTERED, MM_MODEM_STATE_CONNECTED ] and modem.SignalQuality[0] > 0 and modem.RegistrationState == 1:
|
if modem.GetStatus()["state"] in [ MM_MODEM_STATE_REGISTERED, MM_MODEM_STATE_CONNECTED ] and modem.SignalQuality[0] > 0 and modem.RegistrationState == 1:
|
||||||
exit(0)
|
exit(0)
|
||||||
else:
|
else:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue