diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-01-22 09:48:26 -0600 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2015-01-22 09:48:26 -0600 |
commit | dfab99156ba52ced371d86dd325c6b37dffa5c63 (patch) | |
tree | b4a7d95c3cadcccfdf4cee4eae9134b1e613e833 /src/leap/mail/utils.py | |
parent | a3acaed8512c16fc1d53141d288d60eacc6ef94e (diff) | |
parent | 98def315e5f48df6eec713dbe175df8bdfe406dd (diff) |
Merge branch 'feature/new-mail-api' into feature/async-api
It is still a work in progress, many tests fails and there is plenty of
TODOs to fix. But is starting to be a working version.
Diffstat (limited to 'src/leap/mail/utils.py')
-rw-r--r-- | src/leap/mail/utils.py | 3 |
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: |