diff options
Diffstat (limited to 'grc/converter/main.py')
-rw-r--r-- | grc/converter/main.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/grc/converter/main.py b/grc/converter/main.py index 171f98341b..36c712bbfc 100644 --- a/grc/converter/main.py +++ b/grc/converter/main.py @@ -94,10 +94,15 @@ class Converter(object): with open(self.cache_file, 'w', encoding='utf-8') as cache_file: json.dump(self.cache, cache_file) - def load_block_xml(self, xml_file): + def load_block_xml(self, xml_file, force=False): """Load block description from xml file""" - if any(part in xml_file for part in excludes): - return + if any(part in xml_file for part in excludes) and not force: + logger.warn('Skipping {} because name is blacklisted!' + .format(xml_file)) + return False + elif any(part in xml_file for part in excludes) and force: + logger.warn('Forcing conversion of blacklisted file: {}' + .format(xml_file)) block_id_from_xml = path.basename(xml_file)[:-4] yml_file = path.join(self.output_dir, block_id_from_xml + '.block.yml') |