Skip to content

Commit

Permalink
Merge pull request #116 from Zeecka/patch-1
Browse files Browse the repository at this point in the history
Fix multiple choice selection in cmd.py
  • Loading branch information
rsm-gh committed Jan 21, 2024
2 parents 0bd8a34 + 43671ca commit c98dbbe
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions usr/share/AKBL/ModelChooser/cmd.py
Expand Up @@ -48,14 +48,15 @@
print(" Error, only numbers are accepted.")

else:
if inp == 0:
if inp <= 0:
break

elif inp > len(compatible_computers):
print(" Error, the number is not in the list")

else:
if inp > len(compatible_computers):
print(" Error, the number is not in the list")
else:
computer = compatible_computers[i-1]
break
computer = compatible_computers[inp-1]
break



Expand All @@ -64,4 +65,5 @@
#
if computer is not None:
print("Installed computer set to: {}".format(computer.name))
computer_factory.set_installed_computer(computer.name)
computer_factory.set_installed_computer(computer.name)

0 comments on commit c98dbbe

Please sign in to comment.