mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:41:53 +02:00
Fixing conflicts
This commit is contained in:
@@ -343,6 +343,9 @@ class HelpfulArgumentParser(object):
|
|||||||
if parsed_args.csr:
|
if parsed_args.csr:
|
||||||
self.handle_csr(parsed_args)
|
self.handle_csr(parsed_args)
|
||||||
|
|
||||||
|
if parsed_args.must_staple:
|
||||||
|
parsed_args.staple = True
|
||||||
|
|
||||||
# Avoid conflicting args
|
# Avoid conflicting args
|
||||||
conficting_args = ["quiet", "noninteractive_mode", "text_mode"]
|
conficting_args = ["quiet", "noninteractive_mode", "text_mode"]
|
||||||
if parsed_args.dialog_mode:
|
if parsed_args.dialog_mode:
|
||||||
|
|||||||
+18
-5
@@ -41,10 +41,15 @@ def _wrap_lines(msg):
|
|||||||
"""
|
"""
|
||||||
lines = msg.splitlines()
|
lines = msg.splitlines()
|
||||||
fixed_l = []
|
fixed_l = []
|
||||||
for line in lines:
|
|
||||||
fixed_l.append(textwrap.fill(line, 80))
|
|
||||||
return os.linesep.join(fixed_l)
|
|
||||||
|
|
||||||
|
for line in lines:
|
||||||
|
fixed_l.append(textwrap.fill(
|
||||||
|
line,
|
||||||
|
80,
|
||||||
|
break_long_words=False,
|
||||||
|
break_on_hyphens=False))
|
||||||
|
|
||||||
|
return os.linesep.join(fixed_l)
|
||||||
|
|
||||||
@zope.interface.implementer(interfaces.IDisplay)
|
@zope.interface.implementer(interfaces.IDisplay)
|
||||||
class NcursesDisplay(object):
|
class NcursesDisplay(object):
|
||||||
@@ -265,7 +270,11 @@ class FileDisplay(object):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
ans = raw_input(
|
ans = raw_input(
|
||||||
textwrap.fill("%s (Enter 'c' to cancel): " % message, 80))
|
textwrap.fill(
|
||||||
|
"%s (Enter 'c' to cancel): " % message,
|
||||||
|
80,
|
||||||
|
break_long_words=False,
|
||||||
|
break_on_hyphens=False))
|
||||||
|
|
||||||
if ans == "c" or ans == "C":
|
if ans == "c" or ans == "C":
|
||||||
return CANCEL, "-1"
|
return CANCEL, "-1"
|
||||||
@@ -402,7 +411,11 @@ class FileDisplay(object):
|
|||||||
# Write out the menu choices
|
# Write out the menu choices
|
||||||
for i, desc in enumerate(choices, 1):
|
for i, desc in enumerate(choices, 1):
|
||||||
self.outfile.write(
|
self.outfile.write(
|
||||||
textwrap.fill("{num}: {desc}".format(num=i, desc=desc), 80))
|
textwrap.fill(
|
||||||
|
"{num}: {desc}".format(num=i, desc=desc),
|
||||||
|
80,
|
||||||
|
break_long_words=False,
|
||||||
|
break_on_hyphens=False))
|
||||||
|
|
||||||
# Keep this outside of the textwrap
|
# Keep this outside of the textwrap
|
||||||
self.outfile.write(os.linesep)
|
self.outfile.write(os.linesep)
|
||||||
|
|||||||
@@ -201,9 +201,9 @@ class IConfig(zope.interface.Interface):
|
|||||||
"Email used for registration and recovery contact.")
|
"Email used for registration and recovery contact.")
|
||||||
rsa_key_size = zope.interface.Attribute("Size of the RSA key.")
|
rsa_key_size = zope.interface.Attribute("Size of the RSA key.")
|
||||||
must_staple = zope.interface.Attribute(
|
must_staple = zope.interface.Attribute(
|
||||||
"Whether to request the OCSP Must Staple certificate extension. "
|
"Adds the OCSP Must Staple extension to the certificate. "
|
||||||
"Additional setup may be required after issuance. This does not "
|
"Autoconfigures OCSP Stapling for supported setups "
|
||||||
"currently autoconfigure web servers for OCSP stapling. ")
|
"(Apache version >= 2.3.3 ).")
|
||||||
|
|
||||||
config_dir = zope.interface.Attribute("Configuration directory.")
|
config_dir = zope.interface.Attribute("Configuration directory.")
|
||||||
work_dir = zope.interface.Attribute("Working directory.")
|
work_dir = zope.interface.Attribute("Working directory.")
|
||||||
|
|||||||
+7
-2
@@ -82,10 +82,15 @@ class Reporter(object):
|
|||||||
print(le_util.ANSI_SGR_BOLD)
|
print(le_util.ANSI_SGR_BOLD)
|
||||||
print('IMPORTANT NOTES:')
|
print('IMPORTANT NOTES:')
|
||||||
first_wrapper = textwrap.TextWrapper(
|
first_wrapper = textwrap.TextWrapper(
|
||||||
initial_indent=' - ', subsequent_indent=(' ' * 3))
|
initial_indent=' - ',
|
||||||
|
subsequent_indent=(' ' * 3),
|
||||||
|
break_long_words=False,
|
||||||
|
break_on_hyphens=False)
|
||||||
next_wrapper = textwrap.TextWrapper(
|
next_wrapper = textwrap.TextWrapper(
|
||||||
initial_indent=first_wrapper.subsequent_indent,
|
initial_indent=first_wrapper.subsequent_indent,
|
||||||
subsequent_indent=first_wrapper.subsequent_indent)
|
subsequent_indent=first_wrapper.subsequent_indent,
|
||||||
|
break_long_words=False,
|
||||||
|
break_on_hyphens=False)
|
||||||
while not self.messages.empty():
|
while not self.messages.empty():
|
||||||
msg = self.messages.get()
|
msg = self.messages.get()
|
||||||
if self.config.quiet:
|
if self.config.quiet:
|
||||||
|
|||||||
@@ -430,6 +430,13 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
for arg in conflicting_args:
|
for arg in conflicting_args:
|
||||||
self.assertTrue(arg in error.message)
|
self.assertTrue(arg in error.message)
|
||||||
|
|
||||||
|
def test_must_staple_flag(self):
|
||||||
|
parse = self._get_argument_parser()
|
||||||
|
short_args = ['--must-staple']
|
||||||
|
namespace = parse(short_args)
|
||||||
|
self.assertTrue(namespace.must_staple)
|
||||||
|
self.assertTrue(namespace.staple)
|
||||||
|
|
||||||
def test_staging_flag(self):
|
def test_staging_flag(self):
|
||||||
parse = self._get_argument_parser()
|
parse = self._get_argument_parser()
|
||||||
short_args = ['--staging']
|
short_args = ['--staging']
|
||||||
|
|||||||
Reference in New Issue
Block a user