simion / pip-upgrader

An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.
Apache License 2.0
517 stars 37 forks source link

UI: traceback on invalid choice #2

Closed jhermann closed 7 years ago

jhermann commented 7 years ago
…
Please choose which packages should be upgraded. Choices: "all" or "1 2 3"
Choice: q
Traceback (most recent call last):
…
  File "…/pip_upgrader/packages_interactive_selector.py", line 84, in ask_for_packages
    selected = list(self._select_packages([int(index.strip()) for index in choice.split(' ')]))
ValueError: invalid literal for int() with base 10: 'q'

Should be caught with a nice message. And "q(uit)" plus maybe "x/exit" supported as an answer.

simion commented 7 years ago

Done, released new version to pip. Also, it includes new feature: virtualenv checking. It comes with two more options: --skip-virtualenv-check and --skip-package-installation for situations when you're dealing with system python interpreter.