Changeset - d969304ee9cb
[Not reviewed]
0 2 0
x - 11 months ago 2024-05-09 18:38:30
xbr@c3l.lu
style: remove empty line spaces
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
backend/mail.py
Show inline comments
 
@@ -10,13 +10,13 @@ from abc import ABC, abstractmethod
 

	
 
class MailHandler(ABC):
 
    def __init__(self, host: str, port: int, context: ssl.SSLContext):
 
        self.host = host
 
        self.port = port
 
        self.context = context
 
    
 

	
 
    def connect(self, verification: bool) -> int:
 
        connection = self.protocol_init(self.host, self.port)
 
        if verification:
 
            connection.starttls(**self.protocol_starttls_args())
 
        else:
 
            connection.starttls()
 
@@ -30,13 +30,13 @@ class MailHandler(ABC):
 
    @abstractmethod
 
    def protocol_close(self, connection):
 
        raise NotImplementedError()
 
    @abstractmethod
 
    def protocol_starttls_args(self):
 
        raise NotImplementedError()
 
    
 

	
 
    @staticmethod
 
    def create_handler(protocol: str):
 
        if protocol == "smtp":
 
            return SMTPHandler
 
        elif protocol == "imap":
 
            return IMAPHandler
backend/tls_utils.py
Show inline comments
 
@@ -16,13 +16,13 @@ class TLSDetails:
 

	
 
    def __init__(self, domain_name : str = None, expires_in_days : str = None, error_message : str = None, connection_error : bool = False):
 
        self.domain_name = domain_name
 
        self.expires_in_days = expires_in_days
 
        self.error_message = error_message
 
        self.connection_error = connection_error
 
    
 

	
 
    def print(self, console: Console):
 
        if self.connection_error:
 
            console.log("[orange bold underline]" + self.domain_name, self.error_message, style="orange")
 
        elif self.error_message != None:
 
            console.log("[red bold underline]" + self.domain_name, self.error_message, style="red")
 
        elif self.expires_in_days < 0:
0 comments (0 inline, 0 general)