Skip to content

Commit 192b1de

Browse files
authored
Add if statement to avoid UnboundLocalError (#91)
* Fix issue with syncing a challenge that doesn't exist on a CTFd instance.
1 parent 335d7b7 commit 192b1de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ctfcli/cli/challenges.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def sync(self, challenge=None, ignore=()):
196196
break
197197
else:
198198
click.secho(
199-
f'Couldn\'t find existing challenge {c["name"]}. Perhaps you meant install instead of sync?',
199+
f'Couldn\'t find existing challenge {challenge["name"]}. Perhaps you meant install instead of sync?',
200200
fg="red",
201201
)
202202
continue # Go to the next challenge in the overall list

0 commit comments

Comments
 (0)