mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-12 21:28:47 +00:00
codegen: Fix compatibility with Python 2.6
Python 2.6 does not have a flags parameter. This is needed for RHEL 6.8. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
22f8dd18f0
commit
38047fb46f
@ -11,7 +11,7 @@ def write_includes(writer):
|
||||
src = writer.header.options["dest_file"]
|
||||
else:
|
||||
src = "generated_headers.h"
|
||||
src = re.sub(r'[^a-z0-9]+', '_', src, flags=re.IGNORECASE)
|
||||
src = re.sub(r'(?i)[^a-z0-9]+', '_', src)
|
||||
src = src.upper()
|
||||
if src.endswith("_H"):
|
||||
src = "_H_"+src[:-2]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user