Skip to content

Commit d56d22c

Browse files
committed
zero out branch variable when cloning failed
1 parent 4496462 commit d56d22c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

completion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def get_completion(
3535
except git.GitCommandError:
3636
print(f'failed to clone {repo} {branch}')
3737
translators_data = TranslatorsData(0, False)
38+
branch = ''
3839
continue
3940
else:
4041
translators_number = translators.get_number(clone_path)
@@ -69,7 +70,7 @@ def get_completion(
6970

7071
change = completion - month_ago_completion
7172

72-
return completion, translators_data, branch, change
73+
return completion, translators_data, branch or None, change
7374

7475

7576
@dataclass(frozen=True)

0 commit comments

Comments
 (0)