Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

Commit

Permalink
remove somes debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
tikismoke committed Sep 26, 2016
1 parent 5b473ee commit ccf5e45
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/nestdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def writeState(self, name, command, value):
# Todo find a way to handle this case

except AttributeError:
errorstr = u"### Sensor '%s', ERROR while writing value." % pin
errorstr = u"### Sensor '%s', ERROR while writing value." % name
self._log.error(errorstr)
return False, errorstr
return True, None
Expand All @@ -179,19 +179,14 @@ def loop_read_sensor(self, send, stop):
"""
"""
while not stop.isSet():
self._log.debug(u"#########=> Loop_read_sensors")

try: # catch error if self._sensors modify during iteration
self._log.debug(u"#########=> Loop_read_sensors TRY")
print self._sensors
for sensor in self._sensors:
self._log.debug(u"#########=> Loop_read_sensors for sensors")
val = self.readNestApi(sensor['sensor_name'])
if val != "failed":
send(sensor['deviceid'], val)
self._log.debug(u"=> '{0}' : wait for {1} seconds".format(sensor['sensor_name'], self.period))
except:
self._log.debug(u"#########=> Loop_read_sensors EXCEPTION##############")
self._log.error(u"# Loop_read_sensors EXCEPTION")
pass
stop.wait(self.period)

Expand Down

0 comments on commit ccf5e45

Please sign in to comment.