added dumping logs on error
This commit is contained in:
parent
2046dda356
commit
fa7748b0ae
8
alarm.py
8
alarm.py
@ -8,13 +8,16 @@ import datetime
|
||||
def checkPhone():
|
||||
|
||||
response = os.system("ping -c 1 -w5 " + os.environ['PHONEIP'] + " > /dev/null 2>&1")
|
||||
print('checking for phone')
|
||||
log.log('checking for phone')
|
||||
if response == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
try:
|
||||
|
||||
network = networkclass.network(userclass.User())
|
||||
|
||||
found = False
|
||||
@ -39,3 +42,6 @@ if __name__ == '__main__':
|
||||
network.next()
|
||||
|
||||
log.dumpLog()
|
||||
|
||||
except:
|
||||
log.dumpLog()
|
||||
|
Loading…
Reference in New Issue
Block a user