From dec38273b6ee58188e43799b437d5521cf8da04e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Dec 2021 11:59:19 +0200 Subject: [PATCH] Cleanup code --- platformio/commands/remote/command.py | 2 +- platformio/package/manager/core.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/platformio/commands/remote/command.py b/platformio/commands/remote/command.py index 03da8389..248d66d2 100644 --- a/platformio/commands/remote/command.py +++ b/platformio/commands/remote/command.py @@ -37,7 +37,7 @@ from platformio.project.exception import NotPlatformIOProjectError @click.pass_context def cli(ctx, agent): ctx.obj = agent - inject_contrib_pysite(verify_openssl=True) + inject_contrib_pysite() @cli.group("agent", short_help="Start a new agent or list active") diff --git a/platformio/package/manager/core.py b/platformio/package/manager/core.py index 4979901f..fe479c74 100644 --- a/platformio/package/manager/core.py +++ b/platformio/package/manager/core.py @@ -102,7 +102,7 @@ def remove_unnecessary_core_packages(dry_run=False): return candidates -def inject_contrib_pysite(verify_openssl=False): +def inject_contrib_pysite(): # pylint: disable=import-outside-toplevel from site import addsitedir @@ -120,12 +120,10 @@ def inject_contrib_pysite(verify_openssl=False): addsitedir(contrib_pysite_dir) sys.path.insert(0, contrib_pysite_dir) - if not verify_openssl: - return True - try: # pylint: disable=import-error,unused-import,unused-variable from OpenSSL import SSL + except: # pylint: disable=bare-except build_contrib_pysite_package(contrib_pysite_dir) @@ -222,7 +220,6 @@ def get_contrib_pysite_deps(): "cryptography >= 3.3, < 35.0.0", "pyopenssl >= 16.0.0, <= 21.0.0", "service_identity >= 18.1.0, <= 21.1.0", - "asdasdasdasdasdas", ] sys_type = util.get_systype()