cli: do not die on missing description

The DPI setting has no description, do not try to display it.
This commit is contained in:
Peter Wu 2016-03-13 23:59:21 +01:00
parent 5ba816dd38
commit ab162583e4
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ from logitech_receiver import settings as _settings
def _print_setting(s, verbose=True):
print ('#', s.label)
if verbose:
if s.description:
print ('#', s.description.replace('\n', ' '))
if s.kind == _settings.KIND.toggle:
print ('# possible values: on/true/t/yes/y/1 or off/false/f/no/n/0')