Browse Source

Add get_egalax_drm_pure_name

pull/2/head
Ali Hatami Tajik 2 years ago
parent
commit
843835e980
  1. 13
      src/scripts/python/util/egalax.py

13
src/scripts/python/util/egalax.py

@ -65,3 +65,16 @@ def get_egalax_edid_path() -> Path:
max_path = path max_path = path
# TODO add sanity check (both edid and VENDOR:DEVICE are in that base) # TODO add sanity check (both edid and VENDOR:DEVICE are in that base)
return max_path return max_path
def get_egalax_drm_pure_name() -> str:
"""Extract DRM name form edid path
Returns:
str: pure drm name OR none if device is not found
"""
edid_path = get_egalax_edid_path()
if edid_path:
return str(edid_path.parent.stem)
else:
return None

Loading…
Cancel
Save