1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00
This commit is contained in:
Kelly Brazil
2021-10-24 11:21:47 -07:00
parent 1669e6e20c
commit 0313e3f8ca

View File

@ -337,7 +337,6 @@ class _LsUsb():
if char == ' ':
indent += 1
continue
else:
break
return indent
@ -487,12 +486,14 @@ class _LsUsb():
' Hub Port Status:': 'hub_port_status'
}
for sec in string_section_map.keys():
if line.startswith(sec):
self.section = string_section_map[sec]
for sec_string, section_val in string_section_map.items():
if line.startswith(sec_string):
self.section = section_val
self.attribute_value = False
return True
return False
def _populate_lists(self, line):
section_list_map = {
'device_descriptor': self.device_descriptor_list,
@ -509,7 +510,7 @@ class _LsUsb():
'hub_descriptor': self.hub_descriptor_list
}
for sec in section_list_map.keys():
for sec in section_list_map:
if line.startswith(' ') and self.section == sec:
section_list_map[self.section].append(self._add_attributes(line))
return True
@ -523,6 +524,8 @@ class _LsUsb():
self.device_status_list.append(self._add_device_status_attributes(line))
return True
return False
def _populate_schema(self):
"""
Schema: