summaryrefslogtreecommitdiff
path: root/src/leap/mail/utils.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-01-20 01:20:42 -0400
committerKali Kaneko <kali@leap.se>2015-02-11 14:05:43 -0400
commitc3f487002e33b4b4cb65a04f9c192c4e59ec4908 (patch)
tree306858141a63ad64214d193fe1b29725690bfc0e /src/leap/mail/utils.py
parent3e8458b3640167078ad24584fed4a071cae934d9 (diff)
bug: fix empty definition; remove threading use
this fixes a bug by which incoming service was not deleting the message from incoming after correclty saving all the message subparts into soledad.
Diffstat (limited to 'src/leap/mail/utils.py')
-rw-r--r--src/leap/mail/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/mail/utils.py b/src/leap/mail/utils.py
index 457097b..8e51024 100644
--- a/src/leap/mail/utils.py
+++ b/src/leap/mail/utils.py
@@ -45,9 +45,12 @@ def first(things):
def empty(thing):
"""
Return True if a thing is None or its length is zero.
+ If thing is a number (int, float, long), return False.
"""
if thing is None:
return True
+ if isinstance(thing, (int, float, long)):
+ return False
if isinstance(thing, SoledadDocument):
thing = thing.content
try: