Skip to content

Commit ac6be74

Browse files
committed
Fix a bug related to refereced before assignment
1 parent e4ac2b8 commit ac6be74

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/fosslight_util/download.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def get_github_token(git_url):
201201
def download_git_repository(refs_to_checkout, git_url, target_dir, tag):
202202
success = False
203203
oss_version = ""
204-
204+
clone_default_branch_flag = False
205205
if refs_to_checkout:
206206
try:
207207
# gitPython uses the branch argument the same whether you check out to a branch or a tag.
@@ -226,7 +226,6 @@ def download_git_repository(refs_to_checkout, git_url, target_dir, tag):
226226
def download_git_clone(git_url, target_dir, checkout_to="", tag="", branch="", ssh_key=""):
227227
oss_name = get_github_ossname(git_url)
228228
refs_to_checkout = decide_checkout(checkout_to, tag, branch)
229-
clone_default_branch_flag = False
230229
msg = ""
231230
success = True
232231

0 commit comments

Comments
 (0)