From fbc549eb89d2583b7cec8b060bc43cf361abb41e Mon Sep 17 00:00:00 2001 From: Lellansin Huang Date: Fri, 5 Mar 2021 15:52:03 +0800 Subject: [PATCH] feat: clear cache while API URL is modified While we change the API URL, it usually means that we are seeking for a new Gitlab which have new projects. So it's more smooth for us to clear cache while API URL is modified. --- src/gitlab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gitlab.py b/src/gitlab.py index 0fd82ff..de5160c 100644 --- a/src/gitlab.py +++ b/src/gitlab.py @@ -39,6 +39,7 @@ def main(wf): if args.apiurl: log.info("Setting API URL to {url}".format(url=args.apiurl)) wf.settings['api_url'] = args.apiurl + wf.clear_cache() return 0 #################################################################### @@ -112,4 +113,4 @@ def main(wf): 'github_slug': 'lukewaite/alfred-gitlab', }) log = wf.logger - sys.exit(wf.run(main)) \ No newline at end of file + sys.exit(wf.run(main))