Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log level choosing is broken for python3.6.3 #90

Open
MarSoft opened this issue Dec 17, 2017 · 0 comments
Open

Log level choosing is broken for python3.6.3 #90

MarSoft opened this issue Dec 17, 2017 · 0 comments

Comments

@MarSoft
Copy link
Contributor

MarSoft commented Dec 17, 2017

When running on python 3.6.3 (and probably other py3 versions) and specifying -l option (after fixing #89), you will get error:

usage: curd [-h] [-l {}] [--log-file LOG_FILE] [--log-name LOG_NAME] [-q] [-v]
            {install,uninstall,freeze} ...
curd: error: argument -l/--log-level: invalid choice: 'DEBUG' (choose from )

The problem is in curdling/tool/__init__.py, around line 236: in py3, logging._levelToName keys don't contain names, only numeric values. Hence resulting list is empty.

This is trivial to fix (just use .values()), but it should also be tested against other py3 versions - and some autotests should probably be added for curdling.tool.main().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant