diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2015-12-01 23:00:53 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2018-03-27 21:06:27 -0700 |
commit | d64e1cc1d43c173a27bbd77b07f695c41f8c4b55 (patch) | |
tree | 4e27e3b33bedce8fa0da62f450c4ef232389e5bd /giscanner | |
parent | 2a03a8d9fa58d2975406d1421a8a66436419fc71 (diff) | |
download | gobject-introspection-d64e1cc1d43c173a27bbd77b07f695c41f8c4b55.tar.gz |
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.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/transformer.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |