Move logging out of context managers

This commit is contained in:
desbma
2015-01-31 21:28:46 +01:00
parent de8a45a449
commit 798dbfa5bd
+1 -1
View File
@@ -322,8 +322,8 @@ class Fan:
self.logger.warning("%s was %u, setting it to 1", self.enable_filepath, enabled_val) self.logger.warning("%s was %u, setting it to 1", self.enable_filepath, enabled_val)
enable_file.seek(0) enable_file.seek(0)
enable_file.write("1") enable_file.write("1")
with open(self.pwm_filepath, "wt") as pwm_file:
self.logger.debug("Setting PWM value to %u" % (value)) self.logger.debug("Setting PWM value to %u" % (value))
with open(self.pwm_filepath, "wt") as pwm_file:
pwm_file.write("%u" % (value)) pwm_file.write("%u" % (value))