Skip to content

Commit

Permalink
fix bug for #200
Browse files Browse the repository at this point in the history
  • Loading branch information
LoRexxar committed Oct 25, 2021
1 parent 8591d20 commit 7ec9a95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ def check_and_update_rule_database(self, ruleconfig_content, nowrule, config, al

svid = nowrule.svid
ruleconfig_content = str(ruleconfig_content)
nowrule_content = getattr(nowrule, config).replace(r'\"', '"')

if ruleconfig_content.lower() != str(getattr(nowrule, config)).lower():
logger.warning("[INIT][Rule Check] CVI_{} config {} has changed:".format(svid, config))
logger.warning("[INIT][Rule Check] {} in Rule File is {}".format(config, ruleconfig_content))
logger.warning("[INIT][Rule Check] {} in Database is {}".format(config, getattr(nowrule, config)))
logger.warning("[INIT][Rule Check] {} in Database is {}".format(config, nowrule_content))

if always_load_rule_from_file:
logger.warning("[INIT][Rule Check] automatically load new {} from Rule File".format(config))
Expand Down

0 comments on commit 7ec9a95

Please sign in to comment.