Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit c7bd4f6

Browse files
authored
Merge pull request #50 from codewizardshq/master
sync stage <- master
2 parents 5cb9e5a + 30f7c32 commit c7bd4f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CodeChallenge/cli/questions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def q_add(title, answer, rank, asset, hint1, hint2):
2727
ANSWER is the answer stored only in the database
2828
RANK is the day rank the queestion should be revealed on
2929
ASSET is a path to a file to upload for a question
30-
HINT1 is a hint string
30+
HINT1 is a hint string
3131
HINT2 is a hint string
3232
"""
3333

@@ -124,7 +124,6 @@ def q_sync():
124124

125125
with click.progressbar(rows, label="synchronizing with CSV data ...") as bar:
126126
for i, row in enumerate(bar):
127-
128127
if not all((row["rank"], row["title"],
129128
row["answer"], row["asset"])):
130129
errors.append(f"invalid row {i} (missing rank/title/answer/asset)")
@@ -155,7 +154,7 @@ def q_sync():
155154
r2 = requests.get(row["asset"], stream=True)
156155
if not r2.ok:
157156
errors.append(f"failed to download asset for row {i+1}: {row['asset']}")
158-
return
157+
continue
159158

160159
for chunk in r2.iter_content(1024):
161160
b.write(chunk)

0 commit comments

Comments
 (0)