@@ -604,16 +604,16 @@ def _save_netpbm(im, fp, filename):
604
604
605
605
import os
606
606
from subprocess import Popen , check_call , PIPE , CalledProcessError
607
- file = im ._dump ()
607
+ tempfile = im ._dump ()
608
608
609
609
with open (filename , 'wb' ) as f :
610
610
if im .mode != "RGB" :
611
611
with open (os .devnull , 'wb' ) as devnull :
612
- check_call (["ppmtogif" , file ], stdout = f , stderr = devnull )
612
+ check_call (["ppmtogif" , tempfile ], stdout = f , stderr = devnull )
613
613
else :
614
614
# Pipe ppmquant output into ppmtogif
615
- # "ppmquant 256 %s | ppmtogif > %s" % (file , filename)
616
- quant_cmd = ["ppmquant" , "256" , file ]
615
+ # "ppmquant 256 %s | ppmtogif > %s" % (tempfile , filename)
616
+ quant_cmd = ["ppmquant" , "256" , tempfile ]
617
617
togif_cmd = ["ppmtogif" ]
618
618
with open (os .devnull , 'wb' ) as devnull :
619
619
quant_proc = Popen (quant_cmd , stdout = PIPE , stderr = devnull )
@@ -632,7 +632,7 @@ def _save_netpbm(im, fp, filename):
632
632
raise CalledProcessError (retcode , togif_cmd )
633
633
634
634
try :
635
- os .unlink (file )
635
+ os .unlink (tempfile )
636
636
except OSError :
637
637
pass
638
638
0 commit comments