add parse_freqs() method
This commit is contained in:
parent
b31df6934e
commit
46659d9bd5
@ -27,3 +27,19 @@ class da_detector:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise e
|
raise e
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
def parse_freqs(self, path):
|
||||||
|
import json
|
||||||
|
|
||||||
|
fullpath = freqs_folder + path
|
||||||
|
try:
|
||||||
|
with open(fullpath, 'r') as f:
|
||||||
|
j_data = f.read()
|
||||||
|
except Exception as e:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
try:
|
||||||
|
obj = json.loads(j_data)
|
||||||
|
except Exception as e:
|
||||||
|
raise e
|
||||||
|
return obj
|
||||||
|
Reference in New Issue
Block a user