From 3fcc3333a07020a403bdf20229816098c8fb2997 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 27 Oct 2012 16:47:23 +0200 Subject: [PATCH] do not write description line if there are only NotAvailable attributes --- weboob/applications/videoob/videoob.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weboob/applications/videoob/videoob.py b/weboob/applications/videoob/videoob.py index 9d84794e..28f976a1 100644 --- a/weboob/applications/videoob/videoob.py +++ b/weboob/applications/videoob/videoob.py @@ -39,6 +39,9 @@ class VideoListFormatter(PrettyFormatter): return obj.title def get_description(self, obj): + if empty(obj.duration) and empty(obj.date): + return None + result = '%s' % (obj.duration or obj.date) if hasattr(obj, 'author') and not empty(obj.author): result += u' - %s' % obj.author