diff --git a/certbot/display/util.py b/certbot/display/util.py index 5b01dd8d4..f1922ebb9 100644 --- a/certbot/display/util.py +++ b/certbot/display/util.py @@ -176,12 +176,9 @@ class FileDisplay(object): if self._return_default(message, default, cli_flag, force_interactive): return OK, default - ans = input_with_timeout( - textwrap.fill( - "%s (Enter 'c' to cancel): " % message, - 80, - break_long_words=False, - break_on_hyphens=False)) + # Trailing space must be added outside of _wrap_lines to be preserved + message = _wrap_lines("%s (Enter 'c' to cancel):" % message) + " " + ans = input_with_timeout(message) if ans == "c" or ans == "C": return CANCEL, "-1" @@ -392,12 +389,8 @@ class FileDisplay(object): # Write out the menu choices for i, desc in enumerate(choices, 1): - self.outfile.write( - textwrap.fill( - "{num}: {desc}".format(num=i, desc=desc), - 80, - break_long_words=False, - break_on_hyphens=False)) + msg = "{num}: {desc}".format(num=i, desc=desc) + self.outfile.write(_wrap_lines(msg)) # Keep this outside of the textwrap self.outfile.write(os.linesep)