public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] doc/share/conf.py: fix string handling
@ 2022-01-31 10:47 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-01-31 10:47 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

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()".

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 448 bytes --]

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 ''



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-31 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 10:47 [Ada] doc/share/conf.py: fix string handling Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).