they won't make it to stdout as well and break the tool, especially with Python 2.7. Bump revision of glib2-tools.
26 lines
962 B
Text
26 lines
962 B
Text
$NetBSD: patch-gobject_glib-mkenums.in,v 1.4 2018/04/01 20:26:25 joerg Exp $
|
|
|
|
- Revert 4395a897 Use env to run the Python-based tools
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=788527
|
|
- Do not print failing characters that might not be ASCII
|
|
|
|
--- gobject/glib-mkenums.in.orig 2018-01-08 20:00:49.000000000 +0000
|
|
+++ gobject/glib-mkenums.in
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/env @PYTHON@
|
|
+#!@PYTHON@
|
|
|
|
# If the code below looks horrible and unpythonic, do not panic.
|
|
#
|
|
@@ -88,9 +88,8 @@ else:
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20
|
|
def replace_and_warn(err):
|
|
# 7 characters of context either side of the offending character
|
|
- print_warning('UnicodeWarning: {} at {} ({})'.format(
|
|
- err.reason, err.start,
|
|
- err.object[err.start - 7:err.end + 7]))
|
|
+ print_warning('UnicodeWarning: {} at {}'.format(
|
|
+ err.reason, err.start))
|
|
return ('?', err.end)
|
|
|
|
codecs.register_error('replace_and_warn', replace_and_warn)
|