From 95cc03133953eafd0da89a80f1dbb39e7dd43823 Mon Sep 17 00:00:00 2001 From: Robert Habermann Date: Sun, 9 Aug 2015 11:02:21 +0200 Subject: [PATCH 1/2] remove unneccessary check of len on match_parts While getting the best match the function _exact_match is called with the candidate server names as name. Then name.split('.') is called which can never have a length of 0. --- letsencrypt-nginx/letsencrypt_nginx/parser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/letsencrypt-nginx/letsencrypt_nginx/parser.py b/letsencrypt-nginx/letsencrypt_nginx/parser.py index dc82918f9..ef87cc653 100644 --- a/letsencrypt-nginx/letsencrypt_nginx/parser.py +++ b/letsencrypt-nginx/letsencrypt_nginx/parser.py @@ -387,9 +387,6 @@ def _wildcard_match(target_name, name, start): parts.reverse() match_parts.reverse() - if len(match_parts) == 0: - return False - # The first part must be a wildcard or blank, e.g. '.eff.org' first = match_parts.pop(0) if first != '*' and first != '': From 6a1cf1b754d7d55706d20f53baba87aca085ab6e Mon Sep 17 00:00:00 2001 From: Robert Habermann Date: Sun, 9 Aug 2015 11:11:23 +0200 Subject: [PATCH 2/2] fix typo in tox.cover.sh script name --- docs/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 20a588674..a0ec4e792 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -52,7 +52,7 @@ The following tools are there to help you: before submitting a new pull request. - ``tox -e cover`` checks the test coverage only. Calling the - ``./tox-cover.sh`` script directly might be a bit quicker, though. + ``./tox.cover.sh`` script directly might be a bit quicker, though. - ``tox -e lint`` checks the style of the whole project, while ``pylint --rcfile=.pylintrc path`` will check a single file or