]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/amlogic/meson_g12_common/pin.py
Reformatting...
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / amlogic / meson_g12_common / pin.py
index 82fa6ea267b07072b1c629589cdea8b71c8a8ed0..d920b1f96ea4602495192a75b62b53e255105f12 100644 (file)
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
 """
 G12A, G12B, and SM1 Common Definitions
 Ref:
@@ -110,7 +113,7 @@ uartPorts = ((1, UART1_TX, UART1_RX),)
 def get_dts_alias(device: str) -> str:
     """Get the Device Tree Alias"""
     uevent_path = "/sys/bus/platform/devices/" + device + "/uevent"
-    with open(uevent_path, "r") as fd:
+    with open(uevent_path, "r", encoding="utf-8") as fd:
         pattern = r"^OF_ALIAS_0=(.*)$"
         uevent = fd.read().split("\n")
         for line in uevent: