From eecf2072fc43368ddcfabefb4b1e368d4d8417db Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Sat, 19 Aug 2006 17:54:24 +0000 Subject: [PATCH] * do not force to fill optional tags. --- pisi/pxml/autoxml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pisi/pxml/autoxml.py b/pisi/pxml/autoxml.py index 83b8f720..4a1960a5 100644 --- a/pisi/pxml/autoxml.py +++ b/pisi/pxml/autoxml.py @@ -118,8 +118,8 @@ class LocalText(dict): def errors(self, where = unicode()): errs = [] langs = [ LocalText.get_lang(), 'en', 'tr', ] - if not util.any(lambda x : self.has_key(x), langs): - errs.append( where + ': ' + _("Tag should have at least the current locale, or failing that an English or Turkish version")) + if self.keys() and not util.any(lambda x : self.has_key(x), langs): + errs.append( where + ': ' + _("Tag should have at least the current locale, or failing that an English or Turkish version")) #FIXME: check if all entries are unicode return errs