Fix maxwidth handling
[geekigeeki.git] / geekigeeki.py
index f549d0ff2359b47596abd228e480303ebd1b764f..4b95368aaa6759eb60c0009bfa6fd913308883e2 100755 (executable)
@@ -662,10 +662,10 @@ class Page:
  
         for filename in page_list(self._filename(), file_re):
             if image_re.match(filename):
-                maxwidth = config_get(image_maxwidth)
+                maxwidth = config_get(image_maxwidth, '')
                 if maxwidth:
-                    maxwidth_arg = ' | maxwidth=' + str(maxwidth)
-                out += '{{' + self.page_name + '/' + filename + ' | ' + humanlink(filename) + maxwidth_arg + ' | class=thumbleft}}\n'
+                    maxwidth = ' | maxwidth=' + str(maxwidth)
+                out += '{{' + self.page_name + '/' + filename + ' | ' + humanlink(filename) + maxwidth + ' | class=thumbleft}}\n'
             else:
                 out += ' * [[' + self.page_name + '/' + filename + ']]\n'
         return out