Added assertion for parameterized download color picker.
This commit is contained in:
parent
a8d2dbfdfb
commit
7b5d2ace24
@ -362,6 +362,7 @@ class DownloadItem(QObject):
|
|||||||
Args:
|
Args:
|
||||||
position: The color type requested, can be 'fg' or 'bg'.
|
position: The color type requested, can be 'fg' or 'bg'.
|
||||||
"""
|
"""
|
||||||
|
assert position in ("fg", "bg")
|
||||||
start = config.get('colors', 'downloads.{}.start'.format(position))
|
start = config.get('colors', 'downloads.{}.start'.format(position))
|
||||||
stop = config.get('colors', 'downloads.{}.stop'.format(position))
|
stop = config.get('colors', 'downloads.{}.stop'.format(position))
|
||||||
system = config.get('colors', 'downloads.{}.system'.format(position))
|
system = config.get('colors', 'downloads.{}.system'.format(position))
|
||||||
|
Loading…
Reference in New Issue
Block a user