Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20307

Modified Files:
        ImageStripper.py 
Log Message:
Quote the pnmfile.  while tempfile.mkstemp() is called with no arguments,
the user could still set any of these environment variables to affect the
directory in which the temporary file is to be created: TMPDIR, TEMP, TMP.
In theory, those environment variables could contain a directory name
containing whitespace.


Index: ImageStripper.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/ImageStripper.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ImageStripper.py    5 Nov 2006 19:34:16 -0000       1.8
--- ImageStripper.py    6 Nov 2006 14:22:30 -0000       1.9
***************
*** 186,190 ****
              else:
                  self.misses += 1
!                 ocr = os.popen("%s -s %s -c %s -f %s 2>%s" %
                                 (find_program("ocrad"), scale, charset,
                                  pnmfile, os.path.devnull))
--- 186,190 ----
              else:
                  self.misses += 1
!                 ocr = os.popen("%s -s %s -c %s -f '%s' 2>%s" %
                                 (find_program("ocrad"), scale, charset,
                                  pnmfile, os.path.devnull))

_______________________________________________
Spambayes-checkins mailing list
Spambayes-checkins@python.org
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to