[gobject-introspection] maintransformer: when the namespace is empty use error() instead of fatal()



commit 3b630bfb4e89d9ec724ce7ae4c16c0e44635d2b6
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Thu Jan 10 13:55:35 2019 +0100

    maintransformer: when the namespace is empty use error() instead of fatal()
    
    network-manager is calling things like this during configure:
    g-ir-scanner --namespace=test --library=c /dev/null --output /dev/null
    to test if the scanner is working. This results in a fatal error, but
    beause of #229 was ignored.
    
    Do keep this working after we fix #229 downgrade this to a simple recoverable
    error message. An empty namespace doesn't prevent the scanner from creating
    a .gir file so this should be fine.

 giscanner/maintransformer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a448d9d5..23cbb942 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -47,7 +47,7 @@ class MainTransformer(object):
 
     def transform(self):
         if not self._namespace.names:
-            message.fatal('Namespace is empty; likely causes are:\n'
+            message.error('Namespace is empty; likely causes are:\n'
                           '* Not including .h files to be scanned\n'
                           '* Broken --identifier-prefix')
 


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