Skip to content

Commit 75f4c5b

Browse files
committed
resolved an issue about validating the OSes
1 parent 6b222a1 commit 75f4c5b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

enums.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def chose_alternative_laptops(laptops: List[Laptop], person: Person) -> Dict[Ope
9393
break
9494
except ValueError:
9595
print(f"Error, {user_operating_system} is not in available list\n"
96-
f"Available OSs are: {','.join(available_os)}", file=sys.stderr)
97-
sys.exit(1)
96+
f"Available OSs are: {','.join(available_os)}. Try again!.", file=sys.stderr)
97+
9898

9999
preferred_operating_system = OperatingSystem(user_operating_system)
100100

@@ -111,4 +111,3 @@ def chose_alternative_laptops(laptops: List[Laptop], person: Person) -> Dict[Ope
111111
possible_laptops = count_possible_laptops(laptops, user)
112112
print(f"Possible laptops for {user_name}: {possible_laptops}")
113113
alternative_laptops = chose_alternative_laptops(laptops, user)
114-

0 commit comments

Comments
 (0)