commit 7aaa502c33f9e2f617cd097343bb79cf5215fbde
parent 5fc460d8e5c78b2c55018850235088546e5e0659
Author: oscarbenedito <oscar@obenedito.org>
Date:   Sun,  8 Mar 2020 17:24:45 +0100

Added Hugo post-script

Diffstat:
Mgit-backup.py | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-backup.py b/git-backup.py @@ -91,10 +91,10 @@ if 'github.com' in tokens: repositories = get_repositories_data_github(url, tokens['github.com'], page) # custom -if os.path.exists("custom_directories.json"): - custom_file = open('custom_directories.json', 'r') - repositories = json.load(custom_file) - custom_file.close() +if os.path.exists('custom_directories.json'): + with open('custom_directories.json', 'r') as custom_file: + repositories = json.load(custom_file) + for repository in repositories: clone_dir = 'repositories/' + repository['host'] + '/' + repository['path'] print(repository['host'] + '/' + repository['path'])