Ian Bicking committed 9174cff

avoid deprecation warnings when using wdg_validate

Comments (0)

Files changed (1)


     import subprocess
 except ImportError:
     from paste.util import subprocess24 as subprocess
-from paste import wsgilib
+from paste.response import header_value
 import re
 import cgi
         page = output.getvalue()
         status, headers = response
-        v = wsgilib.header_value(headers, 'content-type') or ''
+        v = header_value(headers, 'content-type') or ''
         if (not v.startswith('text/html')
             and not v.startswith('text/xhtml')
             and not v.startswith('application/xhtml')):
         if html_errors:
             page = self.add_error(page, html_errors)[0]
-                     ('Content-Length', 
-                      str(wsgilib.header_value(headers, 'content-length'))))
+                     ('Content-Length',
+                      str(header_value(headers, 'content-length'))))
             headers.append(('Content-Length', str(len(page))))
         return [page]
     def call_wdg_validate(self, wdg_path, ops, page):
         if subprocess is None:
             raise ValueError(
         stdout = proc.communicate(page)[0]
         return stdout
     def add_error(self, html_page, html_errors):
         add_text = ('<pre style="background-color: #ffd; color: #600; '
                     'border: 1px solid #000;">%s</pre>'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.