From d398793a759acc1d8bf2484f3533d0e9744bd429 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 17 Mar 2014 19:10:00 +0100 Subject: Chaged where the configfile is defined and how the config is used --- ddns/cfg_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ddns/cfg_parser.py') diff --git a/ddns/cfg_parser.py b/ddns/cfg_parser.py index e8134cd..8defb71 100644 --- a/ddns/cfg_parser.py +++ b/ddns/cfg_parser.py @@ -9,9 +9,9 @@ def read_config(): global cfg if not cfg_file or not os.path.exists(cfg_file): - return None + cfg = None + return with io.open(cfg_file, 'r') as fp: - _cfg = yaml.load(fp) - - cfg = _cfg + cfg = yaml.load(fp) + fp.close() -- cgit v1.2.3