Skip to content

Commit

Permalink
Suite should be an integer not a string (#407)
Browse files Browse the repository at this point in the history
* Suite should be an integer not a string

* int --> str

* Use integer suite id

* change suite --> suite_idx
  • Loading branch information
kavigupta authored Jan 30, 2020
1 parent ee5a305 commit 4405cb2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/protocols/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ def run(self, messages, env=None):
usage_base = "Usage: python3 ok -q {} --suite {} --trace"
print(usage_base.format(self.args.question[0], eligible_suite_nums[0]))
return
if self.args.suite not in data:
suite_idx = int(self.args.suite)
if suite_idx not in data:
with format.block('*'):
print("Suite {} is not traceable.".format(self.args.suite))
return

suite = data[self.args.suite] # only trace this one suite
suite = data[suite_idx] # only trace this one suite
case_arg = self.args.case
if case_arg:
case_num = case_arg[0]-1
Expand Down

0 comments on commit 4405cb2

Please sign in to comment.