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

Adding "order" to config file cause traceback #212

Closed
brakogh opened this issue Dec 2, 2019 · 1 comment
Closed

Adding "order" to config file cause traceback #212

brakogh opened this issue Dec 2, 2019 · 1 comment
Assignees
Labels

Comments

@brakogh
Copy link

brakogh commented Dec 2, 2019

Adding "order" to config file cause traceback.
Version did-0.15-1.fc30.noarch

Minimal reproducer:
Have config file with two sections, one w/o "order" and one w/ "order":
$ cat .did/config
[general]
email = Branislav Nater bnater@redhat.com

[header]
type = header
highlights = Highlights

[foo]
order = 100
type = items
header = FOO

$ did last week
Traceback (most recent call last):
File "/usr/bin/did", line 42, in
did.cli.main()
File "/usr/lib/python3.7/site-packages/did/cli.py", line 188, in main
options, header = Options(arguments).parse()
File "/usr/lib/python3.7/site-packages/did/cli.py", line 61, in init
self.sample_stats = UserStats()
File "/usr/lib/python3.7/site-packages/did/stats.py", line 187, in init
self.stats = self.configured_plugins(config)
File "/usr/lib/python3.7/site-packages/did/stats.py", line 229, in configured_plugins
return sorted(results, key=lambda x: x.order)
TypeError: '<' not supported between instances of 'int' and 'str'

Additional info:
When "order" is set in config file, it's value is treated like string instead of int.

@psss psss self-assigned this Dec 2, 2019
@psss psss added the bug label Dec 2, 2019
@psss
Copy link
Owner

psss commented Dec 2, 2019

Thanks for catching this. Should be fixed with 485cabd.

@psss psss closed this as completed in 485cabd Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants