diff mbox series

[Ada] doc/share/conf.py: fix string handling

Message ID 20220131104738.GA2690042@adacore.com
State New
Headers show
Series [Ada] doc/share/conf.py: fix string handling | expand

Commit Message

Pierre-Marie de Rodat Jan. 31, 2022, 10:47 a.m. UTC
The recent update on this script to handle strings rather than bytes
missed a call to ".decode()", leading to a crash:

    AttributeError: 'str' object has no attribute 'decode'

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* doc/share/conf.py: Remove spurious call to ".decode()".
diff mbox series

Patch

diff --git a/gcc/ada/doc/share/conf.py b/gcc/ada/doc/share/conf.py
--- a/gcc/ada/doc/share/conf.py
+++ b/gcc/ada/doc/share/conf.py
@@ -43,7 +43,7 @@  def get_gnat_version():
                   r'constant String := "([^\(\)]+)\(.*\)?";',
                   gnatvsn_content)
     if m:
-        return m.group(1).strip().decode()
+        return m.group(1).strip()
     else:
         if texi_fsf and os.path.exists(basever):
             return ''