]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Reformat with python3 -m black
authordjhedges <djhedges@gmail.com>
Fri, 22 Jul 2022 04:14:09 +0000 (21:14 -0700)
committerdjhedges <djhedges@gmail.com>
Fri, 22 Jul 2022 04:14:09 +0000 (21:14 -0700)
src/adafruit_blinka/microcontroller/amlogic/meson_g12_common/pin.py

index 1f306377d16141c98dfcd7d5e5b24b8407d97769..41cf8f2e5918b3f560fc1c054d3ac41ca9545ca8 100644 (file)
@@ -116,13 +116,13 @@ def get_dts_alias(device: str) -> Optional[str]:
     """Get the Device Tree Alias"""
     uevent_path = "/sys/bus/platform/devices/" + device + "/uevent"
     if os.path.exists(uevent_path):
     """Get the Device Tree Alias"""
     uevent_path = "/sys/bus/platform/devices/" + device + "/uevent"
     if os.path.exists(uevent_path):
-      with open(uevent_path, "r", encoding="utf-8") as fd:
-          pattern = r"^OF_ALIAS_0=(.*)$"
-          uevent = fd.read().split("\n")
-          for line in uevent:
-              match = re.search(pattern, line)
-              if match:
-                  return match.group(1).upper()
+        with open(uevent_path, "r", encoding="utf-8") as fd:
+            pattern = r"^OF_ALIAS_0=(.*)$"
+            uevent = fd.read().split("\n")
+            for line in uevent:
+                match = re.search(pattern, line)
+                if match:
+                    return match.group(1).upper()
     return None
 
 
     return None