mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-31 23:20:13 +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");
|
||||
: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