diff options
Diffstat (limited to 'ddns/cfg_parser.py')
-rw-r--r-- | ddns/cfg_parser.py | 8 |
1 files changed, 4 insertions, 4 deletions
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() |