diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-11 12:11:15 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-17 13:21:19 +0100 |
commit | a7878d664f51ed77a574a5d360c9c53863d0d488 (patch) | |
tree | 670e4b187fc658301a01c43a079ed66a17a0559b | |
parent | b66332eb464884d69eef56aa5ecb7ae74d1914cc (diff) |
fw-addr-lists: do not fail on invalid json data
-rw-r--r-- | fw-addr-lists.rsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index 6682f4a..a195c89 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -92,7 +92,9 @@ :set Line ($Line->0); :local Address; :if ([ :pick $Line 0 1 ] = "{") do={ - :set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ]; + :do { + :set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ]; + } on-error={ } } else={ :set Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr")); } |