Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Schoen <schoen@eff.org>2019-01-31 02:12:55 +0300
committercumul0529 <gg6123@naver.com>2020-02-23 19:45:23 +0300
commit0b21e716cabba503e4ec7ce7e722e93a319f361f (patch)
tree935615398783bf5cd013620d1ed682d670c250fe
parent8b90b555186c0c51b0c37389375afcda2f27a3d6 (diff)
Fix lint problems with long lines
-rw-r--r--certbot-nginx/certbot_nginx/_internal/parser.py7
-rw-r--r--certbot-nginx/tests/parser_test.py6
2 files changed, 9 insertions, 4 deletions
diff --git a/certbot-nginx/certbot_nginx/_internal/parser.py b/certbot-nginx/certbot_nginx/_internal/parser.py
index d6182870c..72d4d38de 100644
--- a/certbot-nginx/certbot_nginx/_internal/parser.py
+++ b/certbot-nginx/certbot_nginx/_internal/parser.py
@@ -213,7 +213,9 @@ class NginxParser(object):
except IOError:
logger.warning("Could not open file: %s", item)
except UnicodeDecodeError:
- logger.warning("Could not read file: %s due to invalid unicode character. Only UTF-8 encoding is supported.", item)
+ logger.warning("Could not read file: %s due to invalid "
+ "character. Only UTF-8 encoding is "
+ "supported.", item)
except pyparsing.ParseException as err:
logger.debug("Could not parse file: %s due to %s", item, err)
return trees
@@ -422,7 +424,8 @@ def _parse_ssl_options(ssl_options):
except IOError:
logger.warning("Missing NGINX TLS options file: %s", ssl_options)
except UnicodeDecodeError:
- logger.warn("Could not read file: %s due to invalid unicode character. Only UTF-8 encoding is supported.", ssl_options)
+ logger.warn("Could not read file: %s due to invalid character. "
+ "Only UTF-8 encoding is supported.", ssl_options)
except pyparsing.ParseBaseException as err:
logger.debug("Could not parse file: %s due to %s", ssl_options, err)
return []
diff --git a/certbot-nginx/tests/parser_test.py b/certbot-nginx/tests/parser_test.py
index 232346396..632ea179f 100644
--- a/certbot-nginx/tests/parser_test.py
+++ b/certbot-nginx/tests/parser_test.py
@@ -485,14 +485,16 @@ class NginxParserTest(util.NginxTest):
def test_valid_unicode_characters(self):
nparser = parser.NginxParser(self.config_path)
# pylint: disable=protected-access
- parsed = nparser._parse_files(nparser.abs_path('unicode_support/valid_unicode_comments.conf'))
+ path = nparser.abs_path('unicode_support/valid_unicode_comments.conf')
+ parsed = nparser._parse_files(path)
self.assertEqual(['server'], parsed[0][2][0])
self.assertEqual(['listen', '80'], parsed[0][2][1][3])
def test_invalid_unicode_characters(self):
nparser = parser.NginxParser(self.config_path)
# pylint: disable=protected-access
- parsed = nparser._parse_files(nparser.abs_path('unicode_support/invalid_unicode_comments.conf'))
+ path = nparser.abs_path('unicode_support/invalid_unicode_comments.conf')
+ parsed = nparser._parse_files(path)
self.assertEqual([], parsed)