[impression] on autorise l'impression en batch

Ignore-this: 7e978d5ee7094740cdd30040585be5eb
 manifestement elle marche
rolling back:

Tue Jun  9 15:46:24 CEST 2009  Antoine Durand-Gasselin <adg@crans.org>
  * [impression] corrections diverses

    M ./impression/etat_imprimante.py -1 +1
    M ./impression/gen_code.py -1 +1
    M ./impression/impression_canon.py -10 +9

darcs-hash:20090709135620-bd074-6cd0e502e351b9b246a1949cd49ee6eaf6bd7036.gz
This commit is contained in:
Antoine Durand-Gasselin 2009-07-09 15:56:20 +02:00
parent fd7d0849d9
commit cf105af9cf

View file

@ -450,12 +450,13 @@ class impression:
options += ' -o OutputBin=TrayA' options += ' -o OutputBin=TrayA'
options += ' -o Collate=StapleCollate -o StapleLocation=%s' % self._settings['agrafage'] options += ' -o Collate=StapleCollate -o StapleLocation=%s' % self._settings['agrafage']
for i in range(self._settings['copies']): cmd = "lpr %s -# %d %s" % (options, self._settings['copies'],
cmd = "lpr %s %s" % (options, self._fichier) self._fichier)
(status, rep) = getstatusoutput(cmd) (status, rep) = getstatusoutput(cmd)
self.log.info("printing: %s" % cmd) self.log.info("printing: %s" % cmd)
if status != 0: if status != 0:
self.log.error("erreur impression") self.log.error("erreur impression")
self.log.error("lpr status:%d | rep: %s" % (status, rep)) self.log.error("lpr status:%d | rep: %s" % (status, rep))
raise PrintError, "%s \n status:%d rep: %s" % (cmp, status, rep) raise PrintError, "%s \n status:%d rep: %s" % (cmp, status, rep)