Move python_apps/airtime_analyzer/ to analyzer/
This commit is contained in:
parent
a7d06ad076
commit
2ef63e8c4e
39 changed files with 0 additions and 0 deletions
16
analyzer/airtime_analyzer/config_file.py
Normal file
16
analyzer/airtime_analyzer/config_file.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import configparser
|
||||
|
||||
|
||||
def read_config_file(config_path):
|
||||
"""Parse the application's config file located at config_path."""
|
||||
config = configparser.SafeConfigParser()
|
||||
try:
|
||||
config.readfp(open(config_path))
|
||||
except IOError as e:
|
||||
print("Failed to open config file at {}: {}".format(config_path, e.strerror))
|
||||
exit(-1)
|
||||
except Exception as e:
|
||||
print(e.strerror)
|
||||
exit(-1)
|
||||
|
||||
return config
|
Loading…
Add table
Add a link
Reference in a new issue