From 13827d96c9e5812f50647e76ac498b9745bc729c Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Fri, 19 Dec 2014 16:20:20 -0500 Subject: [PATCH] Added missing config_File.py --- .../airtime_analyzer/config_file.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 python_apps/airtime_analyzer/airtime_analyzer/config_file.py diff --git a/python_apps/airtime_analyzer/airtime_analyzer/config_file.py b/python_apps/airtime_analyzer/airtime_analyzer/config_file.py new file mode 100644 index 000000000..7bd5a0b59 --- /dev/null +++ b/python_apps/airtime_analyzer/airtime_analyzer/config_file.py @@ -0,0 +1,15 @@ +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 " + config_path + ": " + e.strerror + exit(-1) + except Exception as e: + print e.strerror + exit(-1) + + return config \ No newline at end of file