File: 01_null_variables.patch

package info (click to toggle)
python-htmltmpl 1.22-10.1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 668 kB
  • ctags: 210
  • sloc: python: 1,686; perl: 114; makefile: 4; sh: 2
file content (16 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- ../htmltmpl-1.22/htmltmpl.py	2001-12-15 23:11:28.000000000 +0100
+++ htmltmpl.py	2006-06-14 11:54:51.057095134 +0200
@@ -603,9 +603,10 @@
                     # If output of current block is not disabled then append
                     # the substitued and escaped variable to the output.
                     if DISABLE_OUTPUT not in output_control:
-                        value = str(self.find_value(var, loop_name, loop_pass,
-                                                    loop_total, globalp))
-                        out += self.escape(value, escape)
+                        value = self.find_value(var, loop_name, loop_pass,
+                                                loop_total, globalp)
+                        if value != "": 
+                            out += self.escape(str(value), escape)
                         self.DEB("VAR: " + str(var))
 
                 elif token == "<TMPL_LOOP":