From 9958ea234d675662aaefb04393f260d5b2851e84 Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Sun, 23 May 2021 12:04:43 -0500 Subject: [PATCH] pipenv: Pre-migration to pipenv things - Use an alternative xdg module that provides functions to generate XDG-paths. - Fix startup routines for the main configurator. --- g13gui/common.py | 7 ++----- g13gui/main.py | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/g13gui/common.py b/g13gui/common.py index ac9a9c7..5655a87 100644 --- a/g13gui/common.py +++ b/g13gui/common.py @@ -1,10 +1,7 @@ #!/usr/bin/python -import os -import os.path -import xdg.BaseDirectory as basedir +from xdg import xdg_config_home PROGNAME = 'g13gui' VERSION = '0.1.0' -PROFILES_CONFIG_PATH = os.path.join(basedir.save_config_path('g13', 'g13gui'), - 'profiles.json') +PROFILES_CONFIG_PATH = xdg_config_home() / 'g13' / 'g13gui' / 'profiles.json' diff --git a/g13gui/main.py b/g13gui/main.py index 19d666a..329e9cb 100644 --- a/g13gui/main.py +++ b/g13gui/main.py @@ -12,3 +12,7 @@ def main(): app = Application() app.run(sys.argv) + + +if __name__ == '__main__': + main()