@@ -316,39 +316,6 @@ def convert(filename, cache):
316
316
317
317
return newname
318
318
319
- #: Maps file extensions to a function which takes a filename as its
320
- #: only argument to return a list suitable for execution with Popen.
321
- #: The purpose of this is so that the result file (with the given
322
- #: extension) can be verified with tools such as xmllint for svg.
323
- verifiers = {}
324
-
325
- # Turning this off, because it seems to cause multiprocessing issues
326
- if False and matplotlib .checkdep_xmllint ():
327
- verifiers ['svg' ] = lambda filename : [
328
- 'xmllint' , '--valid' , '--nowarning' , '--noout' , filename ]
329
-
330
-
331
- @cbook .deprecated ("2.1" )
332
- def verify (filename ):
333
- """Verify the file through some sort of verification tool."""
334
- if not os .path .exists (filename ):
335
- raise IOError ("'%s' does not exist" % filename )
336
- base , extension = filename .rsplit ('.' , 1 )
337
- verifier = verifiers .get (extension , None )
338
- if verifier is not None :
339
- cmd = verifier (filename )
340
- pipe = subprocess .Popen (cmd , universal_newlines = True ,
341
- stdout = subprocess .PIPE , stderr = subprocess .PIPE )
342
- stdout , stderr = pipe .communicate ()
343
- errcode = pipe .wait ()
344
- if errcode != 0 :
345
- msg = "File verification command failed:\n %s\n " % ' ' .join (cmd )
346
- if stdout :
347
- msg += "Standard output:\n %s\n " % stdout
348
- if stderr :
349
- msg += "Standard error:\n %s\n " % stderr
350
- raise IOError (msg )
351
-
352
319
353
320
def crop_to_same (actual_path , actual_image , expected_path , expected_image ):
354
321
# clip the images to the same size -- this is useful only when
0 commit comments