changeset 223:b70f83d3aa46

text_x_arnica: simplified some lines
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 01 Sep 2008 18:04:50 +0200
parents 873b2bb15da8
children bcd2ea17f130
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Mon Sep 01 17:58:33 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Mon Sep 01 18:04:50 2008 +0200
@@ -337,8 +337,7 @@
         @param quotes: text alias for image file
         """
         ddict = {}
-        # ToDo simplify
-        if len(quotes['image']) > 0:
+        if quotes['image']:
             i = 0
             for txt in quotes['image']:
                 ddict[txt] = quotes['alias'][i]
@@ -419,8 +418,8 @@
             all_files = _get_files(self.request, self.pagename)
         if self.file_regex != u'.':
             all_files = [attfile for attfile in all_files if re.match(self.file_regex, attfile)]
-            # ToDo and not self.only_items
-        if self.sort_by_name and self.only_items is False:
+
+        if self.sort_by_name and not self.only_items:
             all_files.sort()
         if self.sort_by_date:
             for attfile in all_files: