Skip to content

Commit

Permalink
scripts: gerrit: parsepicks: fix some edge cases
Browse files Browse the repository at this point in the history
❯ ./gerrit/parsepicks.py '-t q-clock-v2 | -f -t pie-recovery-pathmap'
Traceback (most recent call last):
  File "./gerrit/parsepicks.py", line 48, in <module>
    main()
  File "./gerrit/parsepicks.py", line 39, in main
    changes = range(int(commitrange[0]), int(commitrange[1]))
ValueError: invalid literal for int() with base 10:

Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Jul 21, 2019
1 parent 494d12a commit c6492a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gerrit/parsepicks.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,10 @@ def main():
for j in i.strip().split(' '):
if '-' in j:
commitrange = j.split('-')
changes = range(int(commitrange[0]), int(commitrange[1]))
try:
changes = range(int(commitrange[0]), int(commitrange[1]))
except ValueError:
continue
for change in changes:
commits += query_changes(str(change))
else:

0 comments on commit c6492a7

Please sign in to comment.