mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
minor _get_chall_pref cleanup
This commit is contained in:
@@ -248,17 +248,18 @@ class AuthHandler(object):
|
|||||||
:param str domain: domain for which you are requesting preferences
|
:param str domain: domain for which you are requesting preferences
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Make sure to make a copy...
|
|
||||||
chall_prefs = []
|
chall_prefs = []
|
||||||
|
# Make sure to make a copy...
|
||||||
plugin_pref = self.auth.get_chall_pref(domain)
|
plugin_pref = self.auth.get_chall_pref(domain)
|
||||||
if self.pref_challs:
|
if self.pref_challs:
|
||||||
out = [pref for pref in self.pref_challs if pref in plugin_pref]
|
chall_prefs.extend(pref for pref in self.pref_challs
|
||||||
if out:
|
if pref in plugin_pref)
|
||||||
return out
|
if chall_prefs:
|
||||||
else:
|
return chall_prefs
|
||||||
raise errors.AuthorizationError(
|
raise errors.AuthorizationError(
|
||||||
"None of the selected challenges are supported by the selected plugins")
|
"None of the preferred challenges "
|
||||||
chall_prefs.extend(self.auth.get_chall_pref(domain))
|
"are supported by the selected plugin")
|
||||||
|
chall_prefs.extend(plugin_pref)
|
||||||
return chall_prefs
|
return chall_prefs
|
||||||
|
|
||||||
def _cleanup_challenges(self, achall_list=None):
|
def _cleanup_challenges(self, achall_list=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user