[impression/impression_canon.py] on fait les impressions batch si pas d'agrafe
darcs-hash:20090903193306-bd074-37ffa1fc86b0485c274a103dbf0c870168ebee39.gz
This commit is contained in:
parent
94ae1b0243
commit
79e6b2fd39
1 changed files with 13 additions and 2 deletions
|
@ -450,8 +450,10 @@ class impression:
|
|||
options += ' -o OutputBin=TrayA'
|
||||
options += ' -o Collate=StapleCollate -o StapleLocation=%s' % self._settings['agrafage']
|
||||
|
||||
for i in range(self._settings['copies']):
|
||||
cmd = "lpr %s %s" % (options, self._fichier)
|
||||
|
||||
if not self._settings['livret'] and self._settings['agrafage'] in ['None', None]:
|
||||
cmd = "lpr %s -# %d %s" % (options, self._settings['copies'],
|
||||
self._fichier)
|
||||
(status, rep) = getstatusoutput(cmd)
|
||||
self.log.info("printing: %s" % cmd)
|
||||
if status != 0:
|
||||
|
@ -459,3 +461,12 @@ class impression:
|
|||
self.log.error("lpr status:%d | rep: %s" % (status, rep))
|
||||
raise PrintError, "%s \n status:%d rep: %s" % (cmp, status, rep)
|
||||
|
||||
else:
|
||||
for i in range(self._settings['copies']):
|
||||
cmd = "lpr %s %s" % (options, self._fichier)
|
||||
(status, rep) = getstatusoutput(cmd)
|
||||
self.log.info("printing: %s" % cmd)
|
||||
if status != 0:
|
||||
self.log.error("erreur impression")
|
||||
self.log.error("lpr status:%d | rep: %s" % (status, rep))
|
||||
raise PrintError, "%s \n status:%d rep: %s" % (cmp, status, rep)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue