From 1afbca031125ad14cbda3ef097ceadd2e3f04dac Mon Sep 17 00:00:00 2001 From: Xieyt Date: Mon, 15 Jul 2024 23:01:33 +0530 Subject: [PATCH] fix: not working in python3.10 --- frappe_manager/docker_wrapper/DockerClient.py | 2 -- frappe_manager/ssl_manager/letsencrypt_certificate.py | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frappe_manager/docker_wrapper/DockerClient.py b/frappe_manager/docker_wrapper/DockerClient.py index 2cc41b0..e72bcca 100644 --- a/frappe_manager/docker_wrapper/DockerClient.py +++ b/frappe_manager/docker_wrapper/DockerClient.py @@ -1,11 +1,9 @@ import json import shlex -from sys import exception from typing import Literal, Optional, List from pathlib import Path from frappe_manager.docker_wrapper.DockerCompose import DockerComposeWrapper -from frappe_manager.display_manager.DisplayManager import richprint from frappe_manager.docker_wrapper.DockerException import DockerException from frappe_manager.utils.docker import ( SubprocessOutput, diff --git a/frappe_manager/ssl_manager/letsencrypt_certificate.py b/frappe_manager/ssl_manager/letsencrypt_certificate.py index 88c8e49..db943c8 100644 --- a/frappe_manager/ssl_manager/letsencrypt_certificate.py +++ b/frappe_manager/ssl_manager/letsencrypt_certificate.py @@ -1,4 +1,4 @@ -from typing import Optional, List, Self +from typing import Optional, List from pydantic import EmailStr, Field, model_validator from frappe_manager.ssl_manager import LETSENCRYPT_PREFERRED_CHALLENGE from frappe_manager.ssl_manager.certificate import SSLCertificate @@ -14,13 +14,12 @@ class LetsencryptSSLCertificate(SSLCertificate): toml_exclude: Optional[set] = {'domain', 'alias_domains', 'toml_exclude'} @model_validator(mode="after") - def validate_credentials(self) -> Self: + def validate_credentials(self): if self.preferred_challenge == LETSENCRYPT_PREFERRED_CHALLENGE.dns01: if self.api_key or self.api_token: return self else: raise SSLDNSChallengeCredentailsNotFound() - return self def get_cloudflare_dns_credentials(self) -> str: