annotations: avoid converting null results to kconfig format
authorAndrea Righi <andrea.righi@canonical.com>
Mon, 14 Nov 2022 20:49:36 +0000 (21:49 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 14 Nov 2022 20:49:36 +0000 (21:49 +0100)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
annotations

index 138507dd4ef27cdc29bae479cea2d2cd1cf173c4..9829dbc99cf6ef0ca407acd0ee7514577bf7e830 100755 (executable)
@@ -55,7 +55,8 @@ def do_export(args):
         arg_fail('error: --export requires --arch')
     a = Annotation(args.file)
     conf = a.search_config(config=args.config, arch=args.arch, flavour=args.flavour)
-    print(a.to_config(conf))
+    if conf:
+        print(a.to_config(conf))
 
 def do_import(args):
     # Determine arch and flavour