mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
allow instance variable pass-through and lint
This commit is contained in:
parent
e29ca46422
commit
b3c9ec3ae3
2 changed files with 6 additions and 3 deletions
|
|
@ -569,7 +569,9 @@ class BackwardsCompatibleClientV2(object):
|
|||
self.client = ClientV2(directory, net=net)
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in dir(ClientBase):
|
||||
if name in vars(self.client).keys():
|
||||
return getattr(self.client, name)
|
||||
elif name in dir(ClientBase):
|
||||
return getattr(self.client, name)
|
||||
# temporary, for breaking changes into smaller pieces
|
||||
elif name in dir(Client):
|
||||
|
|
@ -597,7 +599,7 @@ class BackwardsCompatibleClientV2(object):
|
|||
|
||||
def _acme_version_from_directory(self, directory):
|
||||
try:
|
||||
nonce_field = directory['newNonce']
|
||||
nonce_field = directory['newNonce'] # pylint: disable=unused-variable
|
||||
except KeyError:
|
||||
return 1
|
||||
return 2
|
||||
|
|
|
|||
|
|
@ -674,7 +674,8 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met
|
|||
ua = "bandersnatch"
|
||||
args += ["--user-agent", ua]
|
||||
self._call_no_clientmock(args)
|
||||
acme_net.assert_called_once_with(mock.ANY, account=mock.ANY, verify_ssl=True, user_agent=ua)
|
||||
acme_net.assert_called_once_with(mock.ANY, account=mock.ANY, verify_ssl=True,
|
||||
user_agent=ua)
|
||||
|
||||
@mock.patch('certbot.main.plug_sel.record_chosen_plugins')
|
||||
@mock.patch('certbot.main.plug_sel.pick_installer')
|
||||
|
|
|
|||
Loading…
Reference in a new issue