* [gentoo-commits] portage r15192 - main/trunk/bin
@ 2010-01-11 19:16 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; only message in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2010-01-11 19:16 UTC (permalink / raw
To: gentoo-commits
Author: arfrever
Date: 2010-01-11 19:16:19 +0000 (Mon, 11 Jan 2010)
New Revision: 15192
Modified:
main/trunk/bin/check-implicit-pointer-usage.py
Log:
Avoid potential UnicodeDecodeError with Python 3. Reported by devurandom.
Modified: main/trunk/bin/check-implicit-pointer-usage.py
===================================================================
--- main/trunk/bin/check-implicit-pointer-usage.py 2010-01-11 05:22:43 UTC (rev 15191)
+++ main/trunk/bin/check-implicit-pointer-usage.py 2010-01-11 19:16:19 UTC (rev 15192)
@@ -19,6 +19,8 @@
import re
import sys
+from portage import _unicode_decode
+
implicit_pattern = re.compile("([^:]*):(\d+): warning: implicit declaration "
+ "of function [`']([^']*)'")
pointer_pattern = re.compile(
@@ -37,7 +39,10 @@
last_implicit_func = ""
while True:
- line = sys.stdin.readline()
+ if sys.hexversion >= 0x3000000:
+ line = _unicode_decode(sys.stdin.buffer.readline())
+ else:
+ line = sys.stdin.readline()
if line == '':
break
# translate unicode open/close quotes to ascii ones
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-11 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 19:16 [gentoo-commits] portage r15192 - main/trunk/bin Arfrever Frehtes Taifersar Arahesis (arfrever)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox