From a1d8932e3ce36227cb1dc3d41fda189c2d315961 Mon Sep 17 00:00:00 2001
From: Nicolas Cuervo <cuervonicolas@gmail.com>
Date: Thu, 14 Nov 2019 21:51:43 +0100
Subject: Modtool: Update - Add option to convert blacklisted files

Also avoid the misleading behavior that implies conversion
when it isn't happening while also deleting the XML with
a blacklisted name.
---
 gr-utils/python/modtool/core/update.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'gr-utils/python/modtool/core/update.py')

diff --git a/gr-utils/python/modtool/core/update.py b/gr-utils/python/modtool/core/update.py
index e3bd831989..f1b63f74f4 100644
--- a/gr-utils/python/modtool/core/update.py
+++ b/gr-utils/python/modtool/core/update.py
@@ -52,9 +52,10 @@ class ModToolUpdate(ModTool):
     name = 'update'
     description = 'Update the grc bindings for a block'
 
-    def __init__(self, blockname=None, complete=False, **kwargs):
+    def __init__(self, blockname=None, complete=False, include_blacklisted=False, **kwargs):
         ModTool.__init__(self, blockname, **kwargs)
         self.info['complete'] = complete
+        self.info['include_blacklisted'] = include_blacklisted
 
 
     def validate(self):
@@ -86,7 +87,8 @@ class ModToolUpdate(ModTool):
         for blockname in blocks:
             xml_file = "{}_{}.xml".format(module_name, blockname)
             yml_file = "{}_{}.block.yml".format(module_name, blockname)
-            conv.load_block_xml(path+xml_file)
+            if not conv.load_block_xml(path+xml_file, self.info["include_blacklisted"]):
+                continue
             logger.info("Converted {} to {}".format(xml_file, yml_file))
             os.remove(path+xml_file)
             nsubs = self._run_cmakelists(xml_file, yml_file)
-- 
cgit v1.2.3