fixed some minor typos, removed unused variable

master
Alexander Graf 4 years ago
parent f612758a4a
commit 5dfccdafe9

@ -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"

Loading…
Cancel
Save