[PULL,2/2] decodetree: re.fullmatch was added in 3.4
diff mbox series

Message ID 20190125140610.7810-3-ehabkost@redhat.com
State New
Headers show
Series
  • [PULL,1/2] device-crash-test: Python 3 compatibility fix
Related show

Commit Message

Eduardo Habkost Jan. 25, 2019, 2:06 p.m. UTC
From: Paolo Bonzini <pbonzini@redhat.com>

Python 3 versions earlier than 3.4 do not have it, use the
same workaround that is in place for 3.0.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1548410602-16008-1-git-send-email-pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 scripts/decodetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 0bc73b5990..e342d278b8 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -204,7 +204,7 @@  def output(*args):
         output_fd.write(a)
 
 
-if sys.version_info >= (3, 0):
+if sys.version_info >= (3, 4):
     re_fullmatch = re.fullmatch
 else:
     def re_fullmatch(pat, str):