Skip to content

Commit

Permalink
update 2 places for int and str operations
Browse files Browse the repository at this point in the history
  • Loading branch information
dizzygz committed Dec 28, 2023
1 parent 96ac611 commit 1dc6cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions howdoi/howdoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def _get_answers(args):
return False

initial_pos = args['pos'] - 1
final_pos = initial_pos + args['num_answers']
final_pos = initial_pos + int(args['num_answers'])
question_links = question_links[initial_pos:final_pos]
search_engine = os.getenv('HOWDOI_SEARCH_ENGINE', 'google')

Expand Down Expand Up @@ -465,7 +465,7 @@ def _get_answer_worker(args, link):
'position': None
}

multiple_answers = (args['num_answers'] > 1 or args['all'])
multiple_answers = (int(args['num_answers']) > 1 or args['all'])

if not answer:
return result
Expand Down

0 comments on commit 1dc6cde

Please sign in to comment.