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