diff options
Diffstat (limited to 'gd_diff.py')
-rw-r--r-- | gd_diff.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -6,6 +6,7 @@ # gns-deb-diff is under the Public Domain. See # <https://creativecommons.org/publicdomain/zero/1.0> +import json import os import re import shlex @@ -229,6 +230,19 @@ def config_file(): return os.path.join(config_dir(), 'config') +def read_config_file(): + """Return config as a Python Object; False when config does not \ + exist. + + """ + cf = config_file() + + if not os.path.isfile(cf): + return False + + return json.load(open(cf, 'r')) + + def pkgs_dir(): """Return the `pkgs` directory. |