mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-05 05:29:37 +00:00
global-functions: $GetMacVendor: :do ... on-error=... -> :onerror ... do=...
This commit is contained in:
parent
5f82a9fa21
commit
d8f0a8902d
1 changed files with 3 additions and 3 deletions
|
|
@ -589,12 +589,12 @@
|
|||
("https://api.macvendors.com/" . [ :pick $Mac 0 8 ]) output=user as-value ]->"data");
|
||||
:return $Vendor;
|
||||
} on-error={
|
||||
:do {
|
||||
:onerror Err {
|
||||
/tool/fetch check-certificate=yes-without-crl ("https://api.macvendors.com/") \
|
||||
output=none as-value;
|
||||
$LogPrint debug $0 ("The mac vendor is not known in database.");
|
||||
} on-error={
|
||||
$LogPrint warning $0 ("Failed getting mac vendor.");
|
||||
} do={
|
||||
$LogPrint warning $0 ("Failed getting mac vendor: " . $Err);
|
||||
}
|
||||
:return "unknown vendor";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue