From ba4fa9fa2db13287207d2fb4cb447596651f636a Mon Sep 17 00:00:00 2001 From: Ben Baron Date: Mon, 6 Jan 2020 12:50:33 -0500 Subject: [PATCH] Moved asset downloading loop inside the if block --- bin/github-backup | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/github-backup b/bin/github-backup index dac6e2a..06f3a42 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -963,13 +963,11 @@ def backup_releases(args, repo_cwd, repository, repos_template, include_assets=F if include_assets: assets = retrieve_data(args, release['assets_url']) if len(assets) > 0: - # give release asset files somewhere to live + # give release asset files somewhere to live & download them (not including source archives) release_assets_cwd = os.path.join(release_cwd, release_name) mkdir_p(release_assets_cwd) - - # download any release asset files (not including source archives) - for asset in assets: - download_file(asset['url'], os.path.join(release_assets_cwd, asset['name']), get_auth(args)) + for asset in assets: + download_file(asset['url'], os.path.join(release_assets_cwd, asset['name']), get_auth(args)) def fetch_repository(name,