diff --git a/lib/model/sdp/commands.py b/lib/model/sdp/commands.py index b6509629fd..e4d5350382 100644 --- a/lib/model/sdp/commands.py +++ b/lib/model/sdp/commands.py @@ -110,7 +110,7 @@ def get_shng_data(self, command, data, **kwargs): try: result = self._lookup(result, lu) except ValueError as e: - self.logger.warning(f'whie parsing reply to {command}, the lookup of {lu} failed: {e}') + self.logger.warning(f'while parsing reply to {command}, the lookup of {lu} failed: {e}') return return result diff --git a/lib/model/smartdeviceplugin.py b/lib/model/smartdeviceplugin.py index 609955bca0..276e28a565 100644 --- a/lib/model/smartdeviceplugin.py +++ b/lib/model/smartdeviceplugin.py @@ -1238,11 +1238,6 @@ def __init__(self, plugin_class, plugin_file): ``__init__.py -v`` - If you add the -a parameter, all items will have an added - - ``visu_acl: /`` - - attribute depending on the read/write configuration. ======================================================================== If you call it with -s as a parameter, the plugin will insert the struct @@ -1251,6 +1246,14 @@ def __init__(self, plugin_class, plugin_file): ``__init__.py -s`` + If you add the -a parameter, all items will have an added + + ``visu_acl: /`` + + attribute depending on the read/write configuration. + + If you add the -l parameter, all items will be lowercase. + """ self.logger = logging.getLogger(__name__) self.logger.setLevel(logging.CRITICAL) @@ -1266,6 +1269,7 @@ def __init__(self, plugin_class, plugin_file): self.struct_mode = False self.acl = False + self.lc = False self.indentwidth = 4 @@ -1287,6 +1291,9 @@ def __init__(self, plugin_class, plugin_file): elif arg_str[:2].lower() == '-a': self.acl = True + elif arg_str[:2].lower() == '-l': + self.lc = True + else: try: # convertible to dict? @@ -1328,7 +1335,7 @@ def __init__(self, plugin_class, plugin_file): def add_item_to_tree(self, item_path, item_dict): """ add entry for custom read group triggers """ - dst_path_elems = item_path.split('.') + dst_path_elems = item_path.lower().split('.') item = {dst_path_elems[-1]: item_dict} for elem in reversed(dst_path_elems[:-1]): item = {elem: item}