Removed a Python 2 fallback in certbot.Reverter. (#8694)

* Removed a Python 2 fallback in certbot.Reverter.

* Removed a Python < 3.6 fallback in certbot-apache._internal.parser.
This commit is contained in:
Mads Jensen
2021-03-04 08:10:56 +11:00
committed by GitHub
parent 9643e85b4c
commit a3abcc001a
2 changed files with 3 additions and 10 deletions
@@ -3,8 +3,6 @@ import copy
import fnmatch
import logging
import re
import sys
from acme.magic_typing import Dict
from acme.magic_typing import List
@@ -737,9 +735,6 @@ class ApacheParser:
:rtype: str
"""
if sys.version_info < (3, 6):
# This strips off final /Z(?ms)
return fnmatch.translate(clean_fn_match)[:-7] # pragma: no cover
# Since Python 3.6, it returns a different pattern like (?s:.*\.load)\Z
return fnmatch.translate(clean_fn_match)[4:-3] # pragma: no cover