mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:22:16 +02:00
types: CredentialsConfiguration.conf can return None
This commit is contained in:
@@ -3,6 +3,7 @@ import logging
|
||||
import re
|
||||
from typing import Any
|
||||
from typing import Callable
|
||||
from typing import cast
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
|
||||
@@ -61,7 +62,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
def _get_linode_client(self) -> '_LinodeLexiconClient':
|
||||
if not self.credentials: # pragma: no cover
|
||||
raise errors.Error("Plugin has not been prepared.")
|
||||
api_key = self.credentials.conf('key')
|
||||
api_key = cast(str,self.credentials.conf('key'))
|
||||
api_version: Optional[Union[str, int]] = self.credentials.conf('version')
|
||||
if api_version == '':
|
||||
api_version = None
|
||||
|
||||
Reference in New Issue
Block a user