浏览代码

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>
Simon Glass 2 年之前
父节点
当前提交
c7967653da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/dtoc/src_scan.py

+ 1 - 1
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():