resetup raspy

This commit is contained in:
Daniel Pollithy 2017-08-31 12:33:22 +02:00
parent fc5f3e4458
commit b38f87184e
2 changed files with 13 additions and 16 deletions

View File

@ -7,6 +7,7 @@ def run():
p = Process(target=drone_poller.run)
p.start()
client.run()
p.join()
if __name__ == '__main__':

View File

@ -59,24 +59,20 @@ def poll_website():
def run():
while True:
try:
try:
# send my own data
notify_website()
except:
print('[x] Could not notify the website')
print("Unexpected error:", sys.exc_info()[0])
# send my own data
notify_website()
except:
print('[x] Could not notify the website')
print("Unexpected error:", sys.exc_info()[0])
try:
# receive new bookings
poll_website()
except :
print('[x] Could not fetch bookings from the website')
print("Unexpected error:", sys.exc_info()[0])
try:
# receive new bookings
poll_website()
except :
print('[x] Could not fetch bookings from the website')
print("Unexpected error:", sys.exc_info()[0])
time.sleep(settings.WEBSITE_POLLING_SLEEP)
except KeyboardInterrupt:
print('Program execution stopped by user')
exit()
time.sleep(settings.WEBSITE_POLLING_SLEEP)
if __name__ == '__main__':