Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not working in python3.10 #222

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions frappe_manager/docker_wrapper/DockerClient.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 2 additions & 3 deletions frappe_manager/ssl_manager/letsencrypt_certificate.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down