summaryrefslogtreecommitdiff
path: root/base/g.py
diff options
context:
space:
mode:
Diffstat (limited to 'base/g.py')
-rw-r--r--base/g.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/g.py b/base/g.py
index 9de213c4e..f73e23f97 100644
--- a/base/g.py
+++ b/base/g.py
@@ -129,10 +129,14 @@ class ConfigBase(object):
fp = open(self.filename, "r")
try:
self.conf.readfp(fp)
+ except configparser.MissingSectionHeaderError:
+ print("")
+ log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
except (configparser.DuplicateOptionError):
log.warn("Found Duplicate Entery in %s" % self.filename)
self.CheckDuplicateEntries()
- fp.close()
+ finally:
+ fp.close()
except (OSError, IOError, configparser.MissingSectionHeaderError):
log.debug("Unable to open file %s for reading." % self.filename)