Closed startergo closed 3 years ago
After adding:
def get_safe_acpi_path(self, path):
if get_safe_acpi_path is not None:
return ".".join([x.split("@")[0] for x in path.split("/") if len(x) and not ":" in x])
I get:
File "/Users/g5/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
cli.main()
File "/Users/g5/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/g5/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 267, in run_file
runpy.run_path(options.target, run_name=compat.force_str("__main__"))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 251, in run_path
code = _get_code_from_file(path_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 232, in _get_code_from_file
code = compile(f.read(), fname, 'exec')
File "/Users/g5/Downloads/USBMap-master/USBMap.py", line 904
return ".".join([x.split("@")[0] for x in path.split("/") if len(x) and not ":" in x])
^
IndentationError: expected an indented block
Not sure about this indentation error. It is not obvious to me.
Actually I made it work partially. At least it runs. Please change:
def get_safe_acpi_path(self, path):
if path is not None:
return ".".join([x.split("@")[0] for x in path.split("/") if len(x) and not ":" in x])
and
rhub_name = "RHUB" if x.split("@")[0].upper() == self.connected_controllers[x]["parent_name"] else x.split("@")[0].upper()
if acpi is not None:
rhub_path = ".".join([acpi,rhub_name])
Result:
Current Controllers:
- pci1b21,2142@0 @ _SB.PCI0.IOU1.PXS2 (Not Unique)
\-> RHUB @ _SB.PCI0.IOU1.PXS2.APPLEUSBXHCIPCI
- pci1b21,2142@0 @ None (Not Unique)
\-> RHUB @ _SB.PCI0.IOU1.PXS2.APPLEUSBXHCIPCI
- UHC4@1A @ _SB.PCI0.UHC4
- UHC5@1A,1 @ _SB.PCI0.UHC5
- UHC6@1A,2 @ _SB.PCI0.UHC6
- pci8086,3a3c@1A,7 @ _SB.PCI0.UHC6
- UHC1@1D @ _SB.PCI0.UHC1
- UHC2@1D,1 @ _SB.PCI0.UHC2
- UHC3@1D,2 @ _SB.PCI0.UHC3
- pci8086,3a3a@1D,7 @ _SB.PCI0.UHC3
D. Discover Ports (Will Ignore Invalid Controllers)
P. Edit & Create USBMap.kext
R. Reset All Detected Ports
A. Generate ACPI Renames For Conflicting Controllers
H. Generate ACPI To Reset RHUBs (May Conflict With Existing SSDT-USB-Reset.aml!)
Q. Quit
Please select an option:
Maybe adding something like: