diff --git a/mirror-gists.py b/mirror-gists.py index 02bdeed..9c48027 100644 --- a/mirror-gists.py +++ b/mirror-gists.py @@ -5,8 +5,8 @@ import requests import json import sys import os -from helper import giteaSetRepoTopics,giteaSession,giteaCreateRepo,ghApi,giteaCreateOrg,giteaGetUser -config = json.loads(open(os.path.expanduser("./config.json")).read().strip()) +from helper import getConfig, giteaSetRepoTopics,giteaSession,giteaCreateRepo,ghApi,giteaCreateOrg,giteaGetUser +config = getConfig() session = giteaSession() gh = ghApi() @@ -62,4 +62,5 @@ for repo in gh.get_user().get_gists(): topics.append('public-{0}-gist'.format(repo_owner)) giteaSetRepoTopics(repo_owner,m["repo_name"],topics) - print(" ") \ No newline at end of file + print(" ") + exit(1) \ No newline at end of file