[intranet/impression] pylint conformace
Ignore-this: 9b899ee6a2eeb972997317c636c98dc0 darcs-hash:20090515111349-bd074-9bf23ec6d07fdb9faa0ece7ec0377ea54fa8aae2.gz
This commit is contained in:
parent
708129aa2d
commit
9dae9ed43b
1 changed files with 7 additions and 7 deletions
|
@ -46,7 +46,7 @@ class threadedImpression(Thread, crans.impression.impression):
|
||||||
self.tadh = adh
|
self.tadh = adh
|
||||||
Thread.__init__(self)
|
Thread.__init__(self)
|
||||||
|
|
||||||
def run():
|
def run(self):
|
||||||
crans.impression.impression.__init__(self, self.tpath_to_pdf, self.tadh)
|
crans.impression.impression.__init__(self, self.tpath_to_pdf, self.tadh)
|
||||||
if self.tcallback:
|
if self.tcallback:
|
||||||
self.tcallback(self)
|
self.tcallback(self)
|
||||||
|
@ -131,7 +131,7 @@ class main(ModuleBase):
|
||||||
'values': { },
|
'values': { },
|
||||||
'standalone':True,
|
'standalone':True,
|
||||||
}
|
}
|
||||||
devis.exposed=True
|
devis.exposed = True
|
||||||
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
@ -150,7 +150,7 @@ class main(ModuleBase):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
crans.cp.log('erreur lors de la creation de la liste de codes :' + str(e), 'IMPRESSION', 1)
|
crans.cp.log('erreur lors de la creation de la liste de codes :' + str(e), 'IMPRESSION', 1)
|
||||||
return {'erreur':str(e)}
|
return {'erreur':str(e)}
|
||||||
codeList.exposed= True
|
codeList.exposed = True
|
||||||
|
|
||||||
#
|
#
|
||||||
# methode qui indique quel fichier utiliser
|
# methode qui indique quel fichier utiliser
|
||||||
|
@ -167,7 +167,7 @@ class main(ModuleBase):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
crans.cp.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
crans.cp.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
||||||
return {'erreur':str(e) }
|
return {'erreur':str(e) }
|
||||||
useFile.exposed= True
|
useFile.exposed = True
|
||||||
|
|
||||||
#
|
#
|
||||||
# methode pour changer les parametres
|
# methode pour changer les parametres
|
||||||
|
@ -238,10 +238,10 @@ class main(ModuleBase):
|
||||||
file_folder = os.path.join(FILE_UPLOAD_BASE_FOLDER, cherrypy.session['uid']+"/")
|
file_folder = os.path.join(FILE_UPLOAD_BASE_FOLDER, cherrypy.session['uid']+"/")
|
||||||
if not os.path.isdir(file_folder):
|
if not os.path.isdir(file_folder):
|
||||||
return []
|
return []
|
||||||
list = os.listdir(file_folder)
|
liste = os.listdir(file_folder)
|
||||||
list_pdf = []
|
list_pdf = []
|
||||||
# exclusion des fichiers qui ne sont pas des PDF
|
# exclusion des fichiers qui ne sont pas des PDF
|
||||||
for f in list:
|
for f in liste:
|
||||||
if commands.getoutput('file -ib %s' % commands.mk2arg(file_folder, f)) == "application/pdf":
|
if commands.getoutput('file -ib %s' % commands.mk2arg(file_folder, f)) == "application/pdf":
|
||||||
list_pdf.append(f)
|
list_pdf.append(f)
|
||||||
return list_pdf
|
return list_pdf
|
||||||
|
@ -254,7 +254,7 @@ class main(ModuleBase):
|
||||||
|
|
||||||
_, tempFileName = tempfile.mkstemp()
|
_, tempFileName = tempfile.mkstemp()
|
||||||
f = open(tempFileName, 'w+b')
|
f = open(tempFileName, 'w+b')
|
||||||
size=0
|
size = 0
|
||||||
while True:
|
while True:
|
||||||
data = aFile.file.read(1024 * 8) # Read blocks of 8KB at a time
|
data = aFile.file.read(1024 * 8) # Read blocks of 8KB at a time
|
||||||
if not data:
|
if not data:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue