Skip to content

Commit

Permalink
Merge pull request #491 from dizzygz/master
Browse files Browse the repository at this point in the history
update 2 places for int and str operations
  • Loading branch information
gleitz authored Jan 6, 2024
2 parents 96ac611 + 1dc6cde commit 6f8813d
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 6f8813d

Please sign in to comment.