From 020124d5ff6c6d177c9c72866b5f4ab2a0349439 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 18 Jun 2014 15:19:35 +0200 Subject: [PATCH] Remove the '*' special fields in formatter --- weboob/tools/application/formatters/iformatter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/formatters/iformatter.py b/weboob/tools/application/formatters/iformatter.py index 3cfe042f..a6e7837d 100644 --- a/weboob/tools/application/formatters/iformatter.py +++ b/weboob/tools/application/formatters/iformatter.py @@ -146,7 +146,7 @@ class IFormatter(object): :type alias: unicode """ if isinstance(obj, CapBaseObject): - if selected_fields is not None and not '*' in selected_fields: + if selected_fields: # can be an empty list (nothing to do), or None (return all fields) obj = obj.copy() for name, value in obj.iter_fields(): if not name in selected_fields: @@ -164,7 +164,7 @@ class IFormatter(object): except ValueError: raise TypeError('Please give a CapBaseObject or a dict') - if selected_fields is not None and not '*' in selected_fields: + if selected_fields: obj = obj.copy() for name, value in obj.iteritems(): if not name in selected_fields: