mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-07-31 16:24:31 +02:00
fw-addr-lists: do not fail on invalid json data
This commit is contained in:
parent
b66332eb46
commit
a7878d664f
1 changed files with 3 additions and 1 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue