Fix internal server error on monitoring

This commit is contained in:
Thiago Alves 2019-09-02 08:37:09 -03:00 committed by GitHub
parent f6b8de465d
commit 820112410b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -26,7 +26,14 @@ def parse_st(st_file):
debug_data.name = tmp[0]
debug_data.location = tmp[2]
debug_data.type = tmp[4].split(';')[0]
debug_vars.append(debug_data)
#don't add special functions (%ML1024 and up) as they are not accessible
if (debug_data.location.find('ML')) > 0:
mb_address = debug_data.location.split('%ML')[1]
if (int(mb_address) < 1024):
debug_vars.append(debug_data)
else:
debug_vars.append(debug_data)
for debugs in debug_vars:
print('Name: ' + debugs.name)
@ -129,4 +136,4 @@ def stop_monitor():
if (monitor_active != False):
monitor_active = False
mb_client.close()
mb_client.close()