mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-22 07:17:05 +00:00
Fixed FURB113 (repeated-append)
This commit is contained in:
parent
e8d1c037cb
commit
541f31b1ba
@ -674,8 +674,7 @@ def hash_dnssec_keys(domain, env):
|
||||
keydata = []
|
||||
for keytype, keyfn in sorted(find_dnssec_signing_keys(domain, env)):
|
||||
oldkeyfn = os.path.join(env['STORAGE_ROOT'], 'dns/dnssec', keyfn + ".private")
|
||||
keydata.append(keytype)
|
||||
keydata.append(keyfn)
|
||||
keydata.extend((keytype, keyfn))
|
||||
with open(oldkeyfn) as fr:
|
||||
keydata.append( fr.read() )
|
||||
keydata = "".join(keydata).encode("utf8")
|
||||
|
@ -302,8 +302,7 @@ def scan_mail_log(env):
|
||||
for date, sender, message in user_data["blocked"]:
|
||||
if len(sender) > 64:
|
||||
sender = sender[:32] + "…" + sender[-32:]
|
||||
user_rejects.append("{} - {} ".format(date, sender))
|
||||
user_rejects.append(" %s" % message)
|
||||
user_rejects.extend(('{} - {} '.format(date, sender), ' %s' % message))
|
||||
rejects.append(user_rejects)
|
||||
|
||||
print_user_table(
|
||||
@ -710,10 +709,7 @@ def print_user_table(users, data=None, sub_data=None, activity=None, latest=None
|
||||
if sub_data is not None:
|
||||
for l, d in sub_data:
|
||||
if d[row]:
|
||||
lines.append("┬")
|
||||
lines.append("│ %s" % l)
|
||||
lines.append("├─%s─" % (len(l) * "─"))
|
||||
lines.append("│")
|
||||
lines.extend(('┬', '│ %s' % l, '├─%s─' % (len(l) * '─'), '│'))
|
||||
max_len = 0
|
||||
for v in list(d[row]):
|
||||
lines.append("│ %s" % v)
|
||||
|
Loading…
Reference in New Issue
Block a user