diff options
author | bmw <bmw@users.noreply.github.com> | 2015-12-16 04:41:14 +0300 |
---|---|---|
committer | bmw <bmw@users.noreply.github.com> | 2015-12-16 04:41:14 +0300 |
commit | 27697dbba852c808f219bc9e436f68be12345db2 (patch) | |
tree | 0df1d2bf8f7923b135d49de90d8b2c53db2c581a /letsencrypt/reporter.py | |
parent | 05ab8b73111c8a299e094807a68f7fbd700bec42 (diff) | |
parent | 16c81250452bb29655d06fbe926594a7cb2183d1 (diff) |
Merge pull request #1805 from nakato/print_function
Use print_function not print_statement
Diffstat (limited to 'letsencrypt/reporter.py')
-rw-r--r-- | letsencrypt/reporter.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/letsencrypt/reporter.py b/letsencrypt/reporter.py index 0905dfa54..c0c7856a7 100644 --- a/letsencrypt/reporter.py +++ b/letsencrypt/reporter.py @@ -1,4 +1,6 @@ """Collects and displays information to the user.""" +from __future__ import print_function + import collections import logging import os @@ -75,8 +77,8 @@ class Reporter(object): no_exception = sys.exc_info()[0] is None bold_on = sys.stdout.isatty() if bold_on: - print le_util.ANSI_SGR_BOLD - print 'IMPORTANT NOTES:' + print(le_util.ANSI_SGR_BOLD) + print('IMPORTANT NOTES:') first_wrapper = textwrap.TextWrapper( initial_indent=' - ', subsequent_indent=(' ' * 3)) next_wrapper = textwrap.TextWrapper( @@ -89,9 +91,9 @@ class Reporter(object): sys.stdout.write(le_util.ANSI_SGR_RESET) bold_on = False lines = msg.text.splitlines() - print first_wrapper.fill(lines[0]) + print(first_wrapper.fill(lines[0])) if len(lines) > 1: - print "\n".join( - next_wrapper.fill(line) for line in lines[1:]) + print("\n".join( + next_wrapper.fill(line) for line in lines[1:])) if bold_on: sys.stdout.write(le_util.ANSI_SGR_RESET) |