You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [email protected]
[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.
The text was updated successfully, but these errors were encountered:
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 [email protected]
[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.
The text was updated successfully, but these errors were encountered: