Skip to content

Commit 1050c1c

Browse files
committed
python: b4_branch: Fix some dumb bugs...
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent 665737e commit 1050c1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/scripts/b4_branch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,25 +120,25 @@ def parse_arguments():
120120
return parser.parse_args()
121121

122122

123-
def push_branch(directory, branch, tags, dry_run):
123+
def push_branch(directory, branch, tags, arguments):
124124
remote_branches = get_remote_b4_branches()
125125

126126
if branch in remote_branches:
127127
lib.utils.print_yellow(f"{branch} already exists on remote, skipping...")
128128
else:
129129
push_cmd = ['push', '--set-upstream', 'korg', f"{branch}:{branch}"]
130-
if dry_run:
130+
if arguments.dry_run:
131131
lib.utils.print_cmd(['git', '-C', directory, *push_cmd])
132132
else:
133133
lib.utils.call_git_loud(directory, push_cmd)
134134

135135
for tag in tags:
136-
if tag in remote_branches[branch]:
136+
if tag in remote_branches.get(branch, []):
137137
lib.utils.print_yellow(f"{tag} already exists on remote, skipping...")
138138
continue
139139

140140
push_cmd = ['push', 'korg', tag]
141-
if dry_run:
141+
if arguments.dry_run:
142142
lib.utils.print_cmd(['git', '-C', directory, *push_cmd])
143143
else:
144144
lib.utils.call_git_loud(directory, push_cmd)

0 commit comments

Comments
 (0)