From: Vladimir Serbinenko Date: Mon, 7 Jul 2025 14:52:17 +0000 (+0000) Subject: util/import_gcry: Make compatible with Python 3.4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=334353a9771535e18bc40648b3d4b416edd9663d;p=thirdparty%2Fgrub.git util/import_gcry: Make compatible with Python 3.4 Signed-off-by: Vladimir Serbinenko Reviewed-by: Daniel Kiper --- diff --git a/util/import_gcry.py b/util/import_gcry.py index ca918c777..9b0e8d936 100644 --- a/util/import_gcry.py +++ b/util/import_gcry.py @@ -249,15 +249,15 @@ for cipher_file in cipher_files: if not re.search (" *};", line) is None: escapenl = " \\" if ismddefine else "" if not iscomma: - fw.write (f" ,{escapenl}\n") - fw.write (f" GRUB_UTIL_MODNAME(\"%s\"){escapenl}\n" % modname); + fw.write (" ,%s\n" % escapenl) + fw.write (" GRUB_UTIL_MODNAME(\"%s\")%s\n" % (modname, escapenl)) if ismd: if not (mdname in mdblocksizes): print ("ERROR: Unknown digest blocksize: %s\n" % mdname) exit (1) - fw.write (f" .blocksize = %s{escapenl}\n" - % mdblocksizes [mdname]) + fw.write (" .blocksize = %s%s\n" + % (mdblocksizes [mdname], escapenl)) ismd = False ismddefine = False mdarg = 0 @@ -361,7 +361,7 @@ for cipher_file in cipher_files: if isc and not m is None: bs = m.groups()[0] bits = m.groups()[2] - mdname = f"_gcry_digest_spec_blake2{bs}_{bits}" + mdname = "_gcry_digest_spec_blake2%s_%s" % (bs, bits) mdnames.append (mdname) m = re.match ("(const )?gcry_md_spec_t", line)