From: Simon Glass <sjg@chromium.org>
Date: Sun, 4 Jul 2021 18:19:43 +0000 (-0600)
Subject: dtoc: Avoid using subscripts on match objects
X-Git-Tag: v2025.01-rc5-pxa1908~1785^2~36
X-Git-Url: http://git.dujemihanovic.xyz/projects?a=commitdiff_plain;h=c7967653daffa56caaa410937107271b0dc682a9;p=u-boot.git

dtoc: Avoid using subscripts on match objects

These are not supported before Python 3.6 so avoid them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Walter Lozano <walter.lozano@collabora.com>
---

diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py
index 2db96884c8..1dbb56712a 100644
--- a/tools/dtoc/src_scan.py
+++ b/tools/dtoc/src_scan.py
@@ -555,7 +555,7 @@ class Scanner:
                 if ids_m:
                     ids_name = ids_m.group(1)
                 elif m_alias:
-                    self._driver_aliases[m_alias[2]] = m_alias[1]
+                    self._driver_aliases[m_alias.group(2)] = m_alias.group(1)
 
         # Make the updates based on what we found
         for driver in drivers.values():