diff options
author | Magnus Hagander | 2018-12-14 16:57:16 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-12-14 16:57:16 +0000 |
commit | 3e63c99bef870e3a466f59248b338611d625f867 (patch) | |
tree | bf6b771fe864fa7db0b7cb0e3e53f61bbb7b54ba /postgresqleu/mailqueue/admin.py | |
parent | 9c17273a9dd5128f42ea69ca7965f5c20fd13c1f (diff) |
Avoid multi-statement rows
Diffstat (limited to 'postgresqleu/mailqueue/admin.py')
-rw-r--r-- | postgresqleu/mailqueue/admin.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/postgresqleu/mailqueue/admin.py b/postgresqleu/mailqueue/admin.py index 6529ea18..b99a3b63 100644 --- a/postgresqleu/mailqueue/admin.py +++ b/postgresqleu/mailqueue/admin.py @@ -16,12 +16,14 @@ class QueuedMailAdmin(admin.ModelAdmin): parser = Parser() msg = parser.parsestr(obj.fullmsg) b = msg.get_payload(decode=True) - if b: return b + if b: + return b pl = msg.get_payload() for p in pl: b = p.get_payload(decode=True) - if b: return b + if b: + return b return "Could not find body" except Exception, e: return "Failed to get body: %s" % e |