[gobject-introspection: 2/30] transformer: Strip whitespace from filter commands



commit aad9d83e58c7ca3e6a4df983c7124664b1985b03
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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752468

 giscanner/transformer.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 1a27aa3c..c3187e82 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -262,6 +262,7 @@ currently-scanned namespace is first."""
                                     stderr=subprocess.PIPE)
             _name = name
             proc_name, err = proc.communicate(name.encode())
+            proc_name = proc_name.strip()
             if proc.returncode:
                 raise ValueError('filter: %r exited: %d with error: %s' %
                                  (self._symbol_filter_cmd, proc.returncode, err))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]