Skip to content

Commit

Permalink
code style: do not use f-string in logging statement
Browse files Browse the repository at this point in the history
  • Loading branch information
fariss committed Jun 1, 2024
1 parent 227a3f3 commit 1e22241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capa/rules/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ def load_cached_ruleset(cache_dir: Path, rule_contents: List[bytes]) -> Optional

def generate_rule_cache(rules_dir: Path, cache_dir: Path) -> bool:
if not rules_dir.is_dir():
logger.error(f"rules directory '{rules_dir}' does not exist")
logger.error("rules directory %s does not exist", rules_dir)
return False

try:
cache_dir.mkdir(parents=True, exist_ok=True)
rules = capa.rules.get_rules([rules_dir], cache_dir)
except (IOError, capa.rules.InvalidRule, capa.rules.InvalidRuleSet) as e:
logger.error(f"{str(e)}")
logger.error("%s", str(e))
return False

content = capa.rules.cache.get_ruleset_content(rules)
Expand Down

0 comments on commit 1e22241

Please sign in to comment.