This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mkcfg crashes with ValueError
Type: Stage:
Components: Distutils2 Versions: 3rd party
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, jodal, tarek
Priority: normal Keywords:

Created on 2010-11-13 15:31 by jodal, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg121142 - (view) Author: Stein Magnus Jodal (jodal) * Date: 2010-11-13 15:31
I'm using Distutils2 1.0a3 with Python 2.6.6.


To reproduce:

1. Run ``python -m distutils2.mkcfg``
2. When you get to the Trove classifier step enter e.g. "Apache 2" as license
3. When asked to select a matching license, enter something else than a number, e.g. "Apache"
4. mkcfg crashes with a ValueError


Traceback (most recent call last):
  File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 415, in <module>
    main()
  File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 409, in main
    program.query_user()
  File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 242, in query_user
    self.set_classifier()
  File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 254, in set_classifier
    self.set_license(self.classifiers)
  File "/usr/local/lib/python2.6/dist-packages/distutils2/mkcfg.py", line 319, in set_license
    foundIndex = foundList[int(troveLicense) - 1]
ValueError: invalid literal for int() with base 10: 'Apache'
msg121143 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-11-13 16:51
Thanks for the feedback, I can reproduce this. Fixing it.
msg121146 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-11-13 17:26
Commited in a99e29d63071 (hg.python.org)
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54618
2010-11-13 17:26:44tareksetstatus: open -> closed
resolution: fixed
messages: + msg121146
2010-11-13 16:51:20tareksetmessages: + msg121143
2010-11-13 15:31:10jodalcreate