[gobject-introspection] transformer: Strip whitespace from filter commands
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] transformer: Strip whitespace from filter commands
- Date: Wed, 28 Mar 2018 10:41:04 +0000 (UTC)
commit d64e1cc1d43c173a27bbd77b07f695c41f8c4b55
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Dec 1 23:00:53 2015 -0800
transformer: Strip whitespace from filter commands
On OS X, the output of sed as reported back to Python has a newline at
the end. It seems like a good idea to strip whitespace from the symbol
and identifier filter commands anyhow, so strip() the result.
See #139.
giscanner/transformer.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 81b4d0ae..50018cd2 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -267,6 +267,7 @@ currently-scanned namespace is first."""
raise ValueError('filter: "%s" exited: %d with error: %s' %
(self._symbol_filter_cmd, proc.returncode, err))
name = proc_name.decode('ascii')
+ name = name.strip()
matches = [] # Namespaces which might contain this name
unprefixed_namespaces = [] # Namespaces with no prefix, last resort
@@ -331,7 +332,7 @@ raise ValueError."""
if proc.returncode:
raise ValueError('filter: "%s" exited: %d with error: %s' %
(self._identifier_filter_cmd, proc.returncode, err))
- ident = proc_ident.decode('ascii')
+ ident = proc_ident.decode('ascii').strip()
hidden = ident.startswith('_')
if hidden:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]