correction pour les noms de fichier. os.path ne comprend pas "\ ". J'ai
entoure le nom du fichier avec des guillemets dans les commandes shell. darcs-hash:20061020152319-f46e9-5693447aa5b32a8e0415ddb78dcf8e4090ffda39.gz
This commit is contained in:
parent
f4bf83a69e
commit
fdd441a6ee
2 changed files with 12 additions and 5 deletions
|
@ -26,7 +26,7 @@
|
|||
#
|
||||
# Copyright (c) 2006 by www.crans.org
|
||||
# #############################################################
|
||||
import sys, time, tempfile, os, commands, string, random
|
||||
import sys, time, tempfile, os, commands, string, random, re
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
import config
|
||||
def __init__():
|
||||
|
@ -59,6 +59,9 @@ class FichierInvalide(Exception):
|
|||
def base_prix_couleurs(path_fichier_pdf):
|
||||
# nom_rep seras le dossier dans tmp ou tous les fichier créé par
|
||||
# convert seront entreposé
|
||||
|
||||
path_fichier_pdf = re.sub(r"(?<=[^\\]) ", "\\ ", path_fichier_pdf)
|
||||
|
||||
nom_rep = tempfile.mkdtemp(prefix='tmpimpr')
|
||||
nom_png = "%s/convert.png" % nom_rep # Nom prefixe et chemin des png créé par convert
|
||||
|
||||
|
@ -103,6 +106,10 @@ def base_prix_couleurs(path_fichier_pdf):
|
|||
def base_prix_nb(path_fichier_pdf):
|
||||
# nom_rep seras le dossier dans tmp ou tous les fichier créé par
|
||||
# convert seront entreposé
|
||||
|
||||
# on tranforme les espaces en "\ "
|
||||
path_fichier_pdf = re.sub(r"(?<=[^\\]) ", "\\ ", path_fichier_pdf)
|
||||
|
||||
nom_rep = tempfile.mkdtemp(prefix='tmpimpr')
|
||||
nom_png = "%s/convert.png" % nom_rep # Nom prefixe et chemin des png créé par convert
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue