[Image-SIG] BUG: PIL Ghostscript can't be used in a daemon

Federico Di Gregorio fog at debian.org
Thu Jun 5 11:37:32 EDT 2003

Hi *,

we were trying to use the PIL in a daemon started at boot (via init.d)
and we encountered some problems with the Ghostscript function in
EpsImagePlugin.py. the popen call fails unless /dev/tty redirection
is removed from the command (we replaced it with /dev/null, a daemon
is not interested in gs output.) moreover you don't check the return
value from gs.close(), so the code fails when trying to open the
generated file at line 80. i think something like:

status = gs.close()
if status != 0:
    raise IOError("gs failed: return code = %d" % status)

would be more appropriate.

the PIL version is 1.1.3.


Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog at debian.org
  Those who do not study Lisp are doomed to reimplement it. Poorly.
                                     -- from Karl M. Hegbloom .signature

More information about the Image-SIG mailing list