Fix error
This commit is contained in:
@@ -38,7 +38,8 @@ def post_reading(config: dict, humidity: float, temperature: float):
|
||||
print("Unauthorised: Trying to re-register")
|
||||
config["id"] = register_id(config)
|
||||
update_config(config)
|
||||
raise Exception(f"Reading: server returned {response.status_code}: {response.reason}")
|
||||
else:
|
||||
raise Exception(f"Reading: server returned {response.status_code}: {response.reason}")
|
||||
|
||||
def main():
|
||||
config = load_config()
|
||||
@@ -56,7 +57,7 @@ def main():
|
||||
try:
|
||||
post_reading(config, humidity, temperature)
|
||||
except Exception as e:
|
||||
print(e.message) # Continue for now
|
||||
print(e) # Continue for now
|
||||
sensor_fail_count = 0
|
||||
else:
|
||||
sensor_fail_count = sensor_fail_count + 1
|
||||
|
||||
Reference in New Issue
Block a user