commit | afd1e6d2f0f5aaf4030d13342809ec0915dedf81 | [log] [tgz] |
---|---|---|
author | Julien Palard <julien@palard.fr> | Thu May 09 16:22:15 2019 +0200 |
committer | GitHub <noreply@github.com> | Thu May 09 16:22:15 2019 +0200 |
tree | 832da190993468bc973995f96ca60d580a08069c | |
parent | 88db8bd0648588c67eeab16d0bc72ec5c206e3ad [diff] [blame] |
bpo-36239: Skip comments in gettext infos (GH-12255)
diff --git a/Lib/gettext.py b/Lib/gettext.py index 72a313a..b98f501 100644 --- a/Lib/gettext.py +++ b/Lib/gettext.py
@@ -417,6 +417,9 @@ item = b_item.decode().strip() if not item: continue + # Skip over comment lines: + if item.startswith('#-#-#-#-#') and item.endswith('#-#-#-#-#'): + continue k = v = None if ':' in item: k, v = item.split(':', 1)