mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Handle base AccountError
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from platformio import __registry_api__, fs
|
from platformio import __registry_api__, fs
|
||||||
from platformio.clients.account import AccountClient, AccountNotAuthorized
|
from platformio.clients.account import AccountClient, AccountError
|
||||||
from platformio.clients.http import HTTPClient, HTTPClientError
|
from platformio.clients.http import HTTPClient, HTTPClientError
|
||||||
|
|
||||||
# pylint: disable=too-many-arguments
|
# pylint: disable=too-many-arguments
|
||||||
@ -37,7 +37,7 @@ class RegistryClient(HTTPClient):
|
|||||||
for item in info.get("packages", []):
|
for item in info.get("packages", []):
|
||||||
if set(item.keys()) & private_permissions:
|
if set(item.keys()) & private_permissions:
|
||||||
return True
|
return True
|
||||||
except AccountNotAuthorized:
|
except AccountError:
|
||||||
pass
|
pass
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user