[Windows] Security model for files permissions - STEP 1 (#6893)

This PR is the first part of #6497 to ease the integration, following the new plan propose by @bmw here: #6497 (comment)

This step 1 refactor existing certbot.compat module into certbot.compat.misc, without any logic changed. Package certbot.compat will host the new modules that constitute the security model for Windows.

* Create the certbot.compat package. Move logic in certbot.compat.misc

* Add doc

* Fix lint

* Correct mypy

* Update client.py
This commit is contained in:
Adrien Ferrand
2019-03-28 15:51:48 -07:00
committed by Brad Warren
parent b0fb570c1c
commit 6ce6c67932
26 changed files with 123 additions and 136 deletions
+2 -3
View File
@@ -4,11 +4,10 @@ import os
import zope.component
from certbot import compat
from certbot import errors
from certbot import interfaces
from certbot import util
from certbot.compat import misc
from certbot.display import util as display_util
logger = logging.getLogger(__name__)
@@ -36,7 +35,7 @@ def get_email(invalid=False, optional=True):
"the client with --register-unsafely-without-email "
"but make sure you then backup your account key from "
"{0}\n\n".format(os.path.join(
compat.get_default_folder('config'), 'accounts')))
misc.get_default_folder('config'), 'accounts')))
if optional:
if invalid:
msg += unsafe_suggestion