We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0940e65 commit 22746adCopy full SHA for 22746ad
api.py
@@ -117,8 +117,11 @@ def exec(data):
117
def status():
118
sts = get_status()
119
# getting reset log file
120
- with open('/home/pi/log/reset_trigger_service.log', 'r') as log_file:
121
- data = [x for x in log_file.read().split('\n') if x]
+ try:
+ with open('/home/pi/log/reset_trigger_service.log', 'r') as log_file:
122
+ data = [x for x in log_file.read().split('\n') if x]
123
+ except Exception:
124
+ data = [] # if file doesn't exist, no restore as ever been performed. return empty data
125
126
return {
127
"status": "ok",
0 commit comments