From 0a335105106d60f311d730d6bdba18a510ea8b5c Mon Sep 17 00:00:00 2001 From: realraum Date: Thu, 16 Jul 2009 14:00:25 +0000 Subject: [PATCH] fixing the deamon than shouldn't be running for several months anymore --- door_daemon.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/door_daemon.py b/door_daemon.py index cc6c7c2..dd78d0c 100755 --- a/door_daemon.py +++ b/door_daemon.py @@ -22,20 +22,25 @@ class StatusDisplay(): def display_open(self): if self.last_status_set != self.url_open: - self.last_status_set=self.url_open - #print "accessing %s\n" % self.last_status_set - f = urllib.urlopen(self.last_status_set) - f.read() - f.close() - + try: + #print "accessing %s\n" % self.last_status_set + f = urllib.urlopen(self.last_status_set) + f.read() + f.close() + self.last_status_set=self.url_open + except: + pass + def display_closed(self): if self.last_status_set != self.url_closed: - self.last_status_set=self.url_closed - #print "accessing %s\n" % self.last_status_set - f = urllib.urlopen(self.last_status_set) - f.read() - f.close() - + try: + self.last_status_set=self.url_closed + #print "accessing %s\n" % self.last_status_set + f = urllib.urlopen(self.last_status_set) + f.read() + f.close() + except: + pass class ArduinoUSBThread ( threading.Thread ): def __init__(self, file_dev_ttyusb): -- 1.7.10.4