You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-17 01:32:29 +02:00
fixed some minor typos, removed unused variable
This commit is contained in:
@ -65,10 +65,10 @@ class CommaSeparatedList(db.TypeDecorator):
|
|||||||
|
|
||||||
def process_bind_param(self, value, dialect):
|
def process_bind_param(self, value, dialect):
|
||||||
if type(value) is not list:
|
if type(value) is not list:
|
||||||
raise TypeError("Shoud be a list")
|
raise TypeError("Should be a list")
|
||||||
for item in value:
|
for item in value:
|
||||||
if "," in item:
|
if "," in item:
|
||||||
raise ValueError("No item should contain a comma")
|
raise ValueError("Item must not contain a comma")
|
||||||
return ",".join(value)
|
return ",".join(value)
|
||||||
|
|
||||||
def process_result_value(self, value, dialect):
|
def process_result_value(self, value, dialect):
|
||||||
@ -76,7 +76,7 @@ class CommaSeparatedList(db.TypeDecorator):
|
|||||||
|
|
||||||
|
|
||||||
class JSONEncoded(db.TypeDecorator):
|
class JSONEncoded(db.TypeDecorator):
|
||||||
"""Represents an immutable structure as a json-encoded string.
|
""" Represents an immutable structure as a json-encoded string.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
impl = db.String
|
impl = db.String
|
||||||
@ -172,7 +172,7 @@ class Domain(Base):
|
|||||||
str(rset).split()[-1][:-1] in hostnames
|
str(rset).split()[-1][:-1] in hostnames
|
||||||
for rset in dns.resolver.query(self.name, 'MX')
|
for rset in dns.resolver.query(self.name, 'MX')
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -503,7 +503,7 @@ class Token(Base):
|
|||||||
|
|
||||||
|
|
||||||
class Fetch(Base):
|
class Fetch(Base):
|
||||||
""" A fetched account is a repote POP/IMAP account fetched into a local
|
""" A fetched account is a remote POP/IMAP account fetched into a local
|
||||||
account.
|
account.
|
||||||
"""
|
"""
|
||||||
__tablename__ = "fetch"
|
__tablename__ = "fetch"
|
||||||
|
Reference in New Issue
Block a user