Explorar o código

swupdate-common: fix sha256 regex

Change sha256 regex brackets to parenthesis to apply only on line with 'sha256'
and 'version'.

Signed-off-by: Louis Rannou <louis.rannou@gresille.org>
Louis Rannou %!s(int64=3) %!d(string=hai) anos
pai
achega
23c0ed1dc3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      classes/swupdate-common.bbclass

+ 1 - 1
classes/swupdate-common.bbclass

@@ -81,7 +81,7 @@ def swupdate_write_sha256(s):
        for line in f:
           shastr = r"sha256.+=.+@(.+\")"
           #m = re.match(r"^(?P<before_placeholder>.+)sha256.+=.+(?P<filename>\w+)", line)
-          m = re.match(r"^(?P<before_placeholder>.+)[sha256|version].+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)
+          m = re.match(r"^(?P<before_placeholder>.+)(sha256|version).+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line)
           if m:
               filename = m.group('filename')
               hash = swupdate_get_sha256(s, filename)