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():
|
def checkPhone():
|
||||||
|
|
||||||
response = os.system("ping -c 1 -w5 " + os.environ['PHONEIP'] + " > /dev/null 2>&1")
|
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:
|
if response == 0:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
network = networkclass.network(userclass.User())
|
network = networkclass.network(userclass.User())
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
@ -39,3 +42,6 @@ if __name__ == '__main__':
|
|||||||
network.next()
|
network.next()
|
||||||
|
|
||||||
log.dumpLog()
|
log.dumpLog()
|
||||||
|
|
||||||
|
except:
|
||||||
|
log.dumpLog()
|
||||||
|
@ -9,6 +9,8 @@ import os
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
network = networkclass.network(userclass.User())
|
network = networkclass.network(userclass.User())
|
||||||
playlists = network.getUserPlaylists()
|
playlists = network.getUserPlaylists()
|
||||||
|
|
||||||
@ -28,3 +30,6 @@ if __name__ == '__main__':
|
|||||||
csvwrite.exportPlaylist(play, totalpath)
|
csvwrite.exportPlaylist(play, totalpath)
|
||||||
|
|
||||||
log.dumpLog()
|
log.dumpLog()
|
||||||
|
|
||||||
|
except:
|
||||||
|
log.dumpLog()
|
||||||
|
Loading…
Reference in New Issue
Block a user