diff --git a/archive.py b/archive.py index f09875f..ea58e94 100644 --- a/archive.py +++ b/archive.py @@ -123,7 +123,7 @@ def extract(cnt, dest=None): if dest is not None: nsub = len([x for x in os.listdir(odest) if x.find(os.path.basename(ldest) + ".") == 0]) + 1 if nsub > 1: - yield MailTest("This is your %i%s submission. Last submission on: %s" % (nsub, "st" if nsub == 0 else ("nd" if nsub == 1 else ("rd" if nsub == 3 else "th")), datetime.fromtimestamp(int(os.lstat(ldest).st_mtime))), -1) + yield MailTest("This is your %i%s submission. Last submission on: %s" % (nsub, "st" if nsub == 1 else ("nd" if nsub == 2 else ("rd" if nsub == 3 else "th")), datetime.fromtimestamp(int(os.lstat(ldest).st_mtime))), -1) else: yield MailTest("This is your %i%s submission." % (nsub, "st" if nsub == 1 else ("nd" if nsub == 2 else ("rd" if nsub == 3 else "th"))), -1) if dest != ldest: diff --git a/envelope.py b/envelope.py index e753fc6..2b9d493 100644 --- a/envelope.py +++ b/envelope.py @@ -18,7 +18,8 @@ def import_pubkey(key, GNUPG_DIRECTORY): yield MailTest("New PGP key successfully imported:", details=gpg_output) yield False else: - yield MailTest("An error occurs during PGP key importation:", details=gpg_output) + yield MailTest("An error occurs during PGP key importation:", 1, details=gpg_output) + def assume_rfc3156(msg):