[Erp5-report] r13470 - /erp5/trunk/products/ERP5/Document/PDFDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Mar 17 15:28:40 CET 2007


Author: bartek
Date: Sat Mar 17 15:28:36 2007
New Revision: 13470

URL: http://svn.erp5.org?rev=13470&view=rev
Log:
bugfix - regex in _makeFile was bad and conversion to graphic formats failed if there was only one page

Modified:
    erp5/trunk/products/ERP5/Document/PDFDocument.py

Modified: erp5/trunk/products/ERP5/Document/PDFDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PDFDocument.py?rev=13470&r1=13469&r2=13470&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PDFDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/PDFDocument.py Sat Mar 17 15:28:36 2007
@@ -107,7 +107,7 @@
     z = zipfile.ZipFile(f, 'a')
     for fname in glob.glob(to.replace('.', '*')):
       base = os.path.basename(fname)
-      pg = re.match('.*(\d+)\.'+format, base).groups()
+      pg = re.match('.*?(\d*)\.'+format, base).groups()
       if pg:
         pg = pg[0]
         arcname = '%s/page-%s.%s' % (format, pg, format)




More information about the Erp5-report mailing list