Skip to content

Commit

Permalink
ignore malformed rules
Browse files Browse the repository at this point in the history
Don't exist if a rule is malformed.

Reported by @jonau01 here #17
  • Loading branch information
gustavo-iniguez-goya committed May 11, 2020
1 parent 3270240 commit 061d7a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/rule/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func (l *Loader) Load(path string) error {

err = json.Unmarshal(raw, &r)
if err != nil {
return fmt.Errorf("Error while parsing rule from %s: %s", fileName, err)
log.Error("Error parsing rule from %s: %s", fileName, err)
continue
}

r.Operator.Compile()
Expand Down

3 comments on commit 061d7a2

@Ph0rk0z
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile broke, at least on arch.

ModuleNotFoundError: No module named 'dialogs.ruleseditor'

in stats.py

@gustavo-iniguez-goya
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaargh, you're right, I totally forgot it. Fixed. Thank you!

@Ph0rk0z
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated again and it's working. Now I will do the same on ubuntu.

Please sign in to comment.