File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def get_status():
43
43
temp = "undefined"
44
44
45
45
uptime = subprocess .check_output (["uptime" ]).decode ('utf-8' ).replace ('\n ' , '' )
46
- internet_status = subprocess .check_output (["./scripts /check_conn.sh" ]).decode ('utf-8' ).replace ('\n ' , '' )
46
+ internet_status = subprocess .check_output (["./utils /check_conn.sh" ]).decode ('utf-8' ).replace ('\n ' , '' )
47
47
return {'internet_status' : internet_status ,
48
48
'temp' : temp ,
49
49
'uptime' : uptime }
@@ -52,9 +52,12 @@ def get_status():
52
52
def get_info ():
53
53
# [:-2] strips out '\n' (cat)
54
54
try :
55
- backend_commit = subprocess .check_output (["git" , "rev-parse" , "HEAD" ])[0 :7 ].decode ('utf-8' )
55
+ with open ('manifest.json' , 'r' ) as f :
56
+ metadata = json .load (f )
57
+ backend_commit = metadata ["backendCommit" ][0 :7 ]
56
58
except :
57
- backend_commit = 'undefined'
59
+ backend_commit = "undefined"
60
+
58
61
try :
59
62
coderbot_version = subprocess .check_output (["cat" , "/etc/coderbot/version" ]).decode ('utf-8' ).replace ('\n ' , '' )
60
63
except :
File renamed without changes.
You can’t perform that action at this time.
0 commit comments