Ian Bicking  committed 9174cff

avoid deprecation warnings when using wdg_validate

  • Participants
  • Parent commits e6b9609

Comments (0)

Files changed (1)

File paste/debug/

     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>'