Skip to content

Commit 8135315

Browse files
authored
Merge pull request ianding1#5 from shownlin/master
Fix ValueError in get_submission() when doing int()
2 parents 2ecaf6b + 8dfdd67 commit 8135315

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/leetcode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def get_submission(sid):
541541
# the second key "runtime" is the runtime in milliseconds
542542
# we need to search from the position after the first "runtime" key
543543
prev_runtime = re.search("runtime: '([^']*)'", s)
544-
if not prev_runtime:
544+
if not prev_runtime or not _group1(prev_runtime, 'N/A').split()[0].isdigit():
545545
my_runtime = 0
546546
else:
547547
my_runtime = int(_group1(re.search("runtime: '([^']*)'", s[prev_runtime.end():]), 0))

0 commit comments

Comments
 (0)