Skip to content
Browse files
Allow post and config arguments to be None.
  • Loading branch information
felixfontein committed Jul 24, 2017
1 parent 37eb408 commit 5ebf5640670358b4050609f1b44964ce9f67654e
Showing 1 changed file with 2 additions and 2 deletions.
@@ -73,10 +73,10 @@ def check_conditions(post, filename: str, conditions: list, config: dict, source
"""Check the conditions for a metadata extractor."""
for ct, arg in conditions:
if any((
ct == MetaCondition.config_bool and not config.get(arg, False),
ct == MetaCondition.config_bool and (config is None or not config.get(arg, False)),
ct == MetaCondition.config_present and arg not in config,
ct == MetaCondition.extension and not filename.endswith(arg),
ct == MetaCondition.compiler and != arg,
ct == MetaCondition.compiler and (post is None or != arg),
ct == MetaCondition.never
return False

0 comments on commit 5ebf564

Please sign in to comment.