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