-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: core: rich: Catch ValueError on non-numeric priority values
Be a bit more user-friendly by printing: | Error: INVALID_RULE: invalid 'priority' attribute value 'ab'. instead of Python's default, which is: | Error: invalid literal for int() with base 10: 'ab' Fixes: rhbz 1689429
- Loading branch information
1 parent
0753d6e
commit 4bd0aad
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FWD_START_TEST([rich rule invalid priority]) | ||
AT_KEYWORDS(rich rhbz1689429) | ||
|
||
FWD_CHECK([--add-rich-rule='rule priority=foo accept'], 122, [], | ||
[Error: INVALID_RULE: invalid 'priority' attribute value 'foo'. | ||
]) | ||
FWD_RELOAD | ||
|
||
FWD_END_TEST([ignore]) |