Added the possibility to log OO errors in appy.gen method File.dump and changed some code for avoiding silly Plone warnings on every user click.
This commit is contained in:
parent
0fe011e0aa
commit
fc75a42264
352 changed files with 30 additions and 23 deletions
0
pod/__init__.py
Executable file → Normal file
0
pod/__init__.py
Executable file → Normal file
0
pod/actions.py
Executable file → Normal file
0
pod/actions.py
Executable file → Normal file
0
pod/buffers.py
Executable file → Normal file
0
pod/buffers.py
Executable file → Normal file
0
pod/converter.py
Executable file → Normal file
0
pod/converter.py
Executable file → Normal file
0
pod/doc_importers.py
Executable file → Normal file
0
pod/doc_importers.py
Executable file → Normal file
0
pod/elements.py
Executable file → Normal file
0
pod/elements.py
Executable file → Normal file
0
pod/odf_parser.py
Executable file → Normal file
0
pod/odf_parser.py
Executable file → Normal file
0
pod/pod_parser.py
Executable file → Normal file
0
pod/pod_parser.py
Executable file → Normal file
20
pod/renderer.py
Executable file → Normal file
20
pod/renderer.py
Executable file → Normal file
|
@ -24,13 +24,13 @@ from UserDict import UserDict
|
|||
import appy.pod
|
||||
from appy.pod import PodError
|
||||
from appy.shared.xml_parser import XmlElement
|
||||
from appy.shared.utils import FolderDeleter, executeCommand
|
||||
from appy.pod.pod_parser import PodParser, PodEnvironment, OdInsert
|
||||
from appy.pod.converter import FILE_TYPES
|
||||
from appy.pod.buffers import FileBuffer
|
||||
from appy.pod.xhtml2odt import Xhtml2OdtConverter
|
||||
from appy.pod.doc_importers import OdtImporter, ImageImporter, PdfImporter
|
||||
from appy.pod.styles_manager import StylesManager
|
||||
from appy.shared.utils import FolderDeleter
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
BAD_CONTEXT = 'Context must be either a dict, a UserDict or an instance.'
|
||||
|
@ -370,23 +370,9 @@ class Renderer:
|
|||
cmd = '%s %s %s %s -p%d' % \
|
||||
(self.pyPath, convScript, qResultOdtName, resultType,
|
||||
self.ooPort)
|
||||
prgPipes = os.popen3(cmd)
|
||||
convertOutput = prgPipes[2].read()
|
||||
for pipe in prgPipes:
|
||||
pipe.close()
|
||||
convertOutput = executeCommand(cmd, ignoreLines='warning')
|
||||
if convertOutput:
|
||||
# Remove warnings
|
||||
errors = []
|
||||
for error in convertOutput.split('\n'):
|
||||
error = error.strip()
|
||||
if not error:
|
||||
continue
|
||||
elif error.startswith('warning'):
|
||||
pass
|
||||
else:
|
||||
errors.append(error)
|
||||
if errors:
|
||||
raise PodError(CONVERT_ERROR % '\n'.join(errors))
|
||||
raise PodError(CONVERT_ERROR % convertOutput)
|
||||
except PodError, pe:
|
||||
# When trying to call OO in server mode for producing
|
||||
# ODT (=forceOoCall=True), if an error occurs we still
|
||||
|
|
0
pod/styles.in.content.xml
Executable file → Normal file
0
pod/styles.in.content.xml
Executable file → Normal file
0
pod/styles.in.styles.xml
Executable file → Normal file
0
pod/styles.in.styles.xml
Executable file → Normal file
0
pod/styles_manager.py
Executable file → Normal file
0
pod/styles_manager.py
Executable file → Normal file
0
pod/test/Readme.txt
Executable file → Normal file
0
pod/test/Readme.txt
Executable file → Normal file
0
pod/test/Tester.py
Executable file → Normal file
0
pod/test/Tester.py
Executable file → Normal file
0
pod/test/Tests.rtf
Executable file → Normal file
0
pod/test/Tests.rtf
Executable file → Normal file
0
pod/test/__init__.py
Executable file → Normal file
0
pod/test/__init__.py
Executable file → Normal file
0
pod/test/contexts/ElseStatements.py
Executable file → Normal file
0
pod/test/contexts/ElseStatements.py
Executable file → Normal file
0
pod/test/contexts/Empty.py
Executable file → Normal file
0
pod/test/contexts/Empty.py
Executable file → Normal file
0
pod/test/contexts/FileHandlerImport.py
Executable file → Normal file
0
pod/test/contexts/FileHandlerImport.py
Executable file → Normal file
0
pod/test/contexts/IfAndFors1.py
Executable file → Normal file
0
pod/test/contexts/IfAndFors1.py
Executable file → Normal file
0
pod/test/contexts/ImagesImport.py
Executable file → Normal file
0
pod/test/contexts/ImagesImport.py
Executable file → Normal file
0
pod/test/contexts/OnlyExpressions.py
Executable file → Normal file
0
pod/test/contexts/OnlyExpressions.py
Executable file → Normal file
0
pod/test/contexts/PathImport.py
Executable file → Normal file
0
pod/test/contexts/PathImport.py
Executable file → Normal file
0
pod/test/contexts/PersonsEight.py
Executable file → Normal file
0
pod/test/contexts/PersonsEight.py
Executable file → Normal file
0
pod/test/contexts/PersonsFour.py
Executable file → Normal file
0
pod/test/contexts/PersonsFour.py
Executable file → Normal file
0
pod/test/contexts/PersonsThree.py
Executable file → Normal file
0
pod/test/contexts/PersonsThree.py
Executable file → Normal file
0
pod/test/contexts/PersonsTwo.py
Executable file → Normal file
0
pod/test/contexts/PersonsTwo.py
Executable file → Normal file
0
pod/test/contexts/SimpleForEmptyList.py
Executable file → Normal file
0
pod/test/contexts/SimpleForEmptyList.py
Executable file → Normal file
0
pod/test/contexts/SimpleForFilledList.py
Executable file → Normal file
0
pod/test/contexts/SimpleForFilledList.py
Executable file → Normal file
0
pod/test/contexts/SimpleForRow.py
Executable file → Normal file
0
pod/test/contexts/SimpleForRow.py
Executable file → Normal file
0
pod/test/contexts/SimpleIfIsFalse.py
Executable file → Normal file
0
pod/test/contexts/SimpleIfIsFalse.py
Executable file → Normal file
0
pod/test/contexts/SimpleIfIsTrue.py
Executable file → Normal file
0
pod/test/contexts/SimpleIfIsTrue.py
Executable file → Normal file
0
pod/test/contexts/SimpleTest.py
Executable file → Normal file
0
pod/test/contexts/SimpleTest.py
Executable file → Normal file
0
pod/test/contexts/VarStatements.py
Executable file → Normal file
0
pod/test/contexts/VarStatements.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex2.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex2.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex3.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplex3.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplexTables.py
Executable file → Normal file
0
pod/test/contexts/XhtmlComplexTables.py
Executable file → Normal file
0
pod/test/contexts/XhtmlEntities.py
Executable file → Normal file
0
pod/test/contexts/XhtmlEntities.py
Executable file → Normal file
0
pod/test/contexts/XhtmlKeepWithNext.py
Executable file → Normal file
0
pod/test/contexts/XhtmlKeepWithNext.py
Executable file → Normal file
0
pod/test/contexts/XhtmlNominal.py
Executable file → Normal file
0
pod/test/contexts/XhtmlNominal.py
Executable file → Normal file
0
pod/test/contexts/XhtmlStylesErrors.py
Executable file → Normal file
0
pod/test/contexts/XhtmlStylesErrors.py
Executable file → Normal file
0
pod/test/contexts/XhtmlStylesMapping.py
Executable file → Normal file
0
pod/test/contexts/XhtmlStylesMapping.py
Executable file → Normal file
0
pod/test/contexts/XhtmlTables.py
Executable file → Normal file
0
pod/test/contexts/XhtmlTables.py
Executable file → Normal file
0
pod/test/contexts/XhtmlWithStyle.py
Executable file → Normal file
0
pod/test/contexts/XhtmlWithStyle.py
Executable file → Normal file
0
pod/test/contexts/__init__.py
Executable file → Normal file
0
pod/test/contexts/__init__.py
Executable file → Normal file
0
pod/test/images/linux.jpg
Executable file → Normal file
0
pod/test/images/linux.jpg
Executable file → Normal file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
pod/test/images/plone.png
Executable file → Normal file
0
pod/test/images/plone.png
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
pod/test/images/python.gif
Executable file → Normal file
0
pod/test/images/python.gif
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
pod/test/results/elseStatements.odt
Executable file → Normal file
0
pod/test/results/elseStatements.odt
Executable file → Normal file
0
pod/test/results/errorExpression.odt
Executable file → Normal file
0
pod/test/results/errorExpression.odt
Executable file → Normal file
0
pod/test/results/errorFooter.odt
Executable file → Normal file
0
pod/test/results/errorFooter.odt
Executable file → Normal file
0
pod/test/results/errorForParsetime.odt
Executable file → Normal file
0
pod/test/results/errorForParsetime.odt
Executable file → Normal file
0
pod/test/results/errorForRuntime.odt
Executable file → Normal file
0
pod/test/results/errorForRuntime.odt
Executable file → Normal file
0
pod/test/results/errorIf.odt
Executable file → Normal file
0
pod/test/results/errorIf.odt
Executable file → Normal file
0
pod/test/results/fileHandlerImport.odt
Executable file → Normal file
0
pod/test/results/fileHandlerImport.odt
Executable file → Normal file
0
pod/test/results/forCellCorrectNumber.odt
Executable file → Normal file
0
pod/test/results/forCellCorrectNumber.odt
Executable file → Normal file
0
pod/test/results/forCellNotEnough.odt
Executable file → Normal file
0
pod/test/results/forCellNotEnough.odt
Executable file → Normal file
0
pod/test/results/forCellOnlyOne.odt
Executable file → Normal file
0
pod/test/results/forCellOnlyOne.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch1.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch1.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch2.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch2.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch3.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch3.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch4.odt
Executable file → Normal file
0
pod/test/results/forCellTooMuch4.odt
Executable file → Normal file
0
pod/test/results/forTable.odt
Executable file → Normal file
0
pod/test/results/forTable.odt
Executable file → Normal file
0
pod/test/results/forTableMinus.odt
Executable file → Normal file
0
pod/test/results/forTableMinus.odt
Executable file → Normal file
0
pod/test/results/forTableMinus2.odt
Executable file → Normal file
0
pod/test/results/forTableMinus2.odt
Executable file → Normal file
0
pod/test/results/forTableMinusError.odt
Executable file → Normal file
0
pod/test/results/forTableMinusError.odt
Executable file → Normal file
0
pod/test/results/forTableMinusError2.odt
Executable file → Normal file
0
pod/test/results/forTableMinusError2.odt
Executable file → Normal file
0
pod/test/results/headerFooter.odt
Executable file → Normal file
0
pod/test/results/headerFooter.odt
Executable file → Normal file
0
pod/test/results/ifAndFors1.odt
Executable file → Normal file
0
pod/test/results/ifAndFors1.odt
Executable file → Normal file
0
pod/test/results/ifElseErrors.odt
Executable file → Normal file
0
pod/test/results/ifElseErrors.odt
Executable file → Normal file
0
pod/test/results/imagesImport.odt
Executable file → Normal file
0
pod/test/results/imagesImport.odt
Executable file → Normal file
0
pod/test/results/noPython.odt
Executable file → Normal file
0
pod/test/results/noPython.odt
Executable file → Normal file
0
pod/test/results/onlyExpressions.odt
Executable file → Normal file
0
pod/test/results/onlyExpressions.odt
Executable file → Normal file
0
pod/test/results/pathImport.odt
Executable file → Normal file
0
pod/test/results/pathImport.odt
Executable file → Normal file
0
pod/test/results/simpleForEmptyList.odt
Executable file → Normal file
0
pod/test/results/simpleForEmptyList.odt
Executable file → Normal file
0
pod/test/results/simpleForFilledList.odt
Executable file → Normal file
0
pod/test/results/simpleForFilledList.odt
Executable file → Normal file
0
pod/test/results/simpleForRow.odt
Executable file → Normal file
0
pod/test/results/simpleForRow.odt
Executable file → Normal file
0
pod/test/results/simpleFromTest.odt
Executable file → Normal file
0
pod/test/results/simpleFromTest.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsFalse.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsFalse.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsTrue.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsTrue.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsTrue003.odt
Executable file → Normal file
0
pod/test/results/simpleIfIsTrue003.odt
Executable file → Normal file
0
pod/test/results/simpleMinusError.odt
Executable file → Normal file
0
pod/test/results/simpleMinusError.odt
Executable file → Normal file
0
pod/test/results/simpleTest.odt
Executable file → Normal file
0
pod/test/results/simpleTest.odt
Executable file → Normal file
0
pod/test/results/withAnImage.odt
Executable file → Normal file
0
pod/test/results/withAnImage.odt
Executable file → Normal file
0
pod/test/results/xhtmlComplex.odt
Executable file → Normal file
0
pod/test/results/xhtmlComplex.odt
Executable file → Normal file
0
pod/test/results/xhtmlComplexTables.odt
Executable file → Normal file
0
pod/test/results/xhtmlComplexTables.odt
Executable file → Normal file
0
pod/test/results/xhtmlKeepWithNext.odt
Executable file → Normal file
0
pod/test/results/xhtmlKeepWithNext.odt
Executable file → Normal file
0
pod/test/results/xhtmlNominal.odt
Executable file → Normal file
0
pod/test/results/xhtmlNominal.odt
Executable file → Normal file
0
pod/test/results/xhtmlStylesErrors.odt
Executable file → Normal file
0
pod/test/results/xhtmlStylesErrors.odt
Executable file → Normal file
0
pod/test/results/xhtmlStylesMapping.odt
Executable file → Normal file
0
pod/test/results/xhtmlStylesMapping.odt
Executable file → Normal file
0
pod/test/templates/ElseStatements.odt
Executable file → Normal file
0
pod/test/templates/ElseStatements.odt
Executable file → Normal file
0
pod/test/templates/ErrorExpression.odt
Executable file → Normal file
0
pod/test/templates/ErrorExpression.odt
Executable file → Normal file
0
pod/test/templates/ErrorFooter.odt
Executable file → Normal file
0
pod/test/templates/ErrorFooter.odt
Executable file → Normal file
0
pod/test/templates/ErrorForParsetime.odt
Executable file → Normal file
0
pod/test/templates/ErrorForParsetime.odt
Executable file → Normal file
0
pod/test/templates/ErrorForRuntime.odt
Executable file → Normal file
0
pod/test/templates/ErrorForRuntime.odt
Executable file → Normal file
0
pod/test/templates/ErrorIf.odt
Executable file → Normal file
0
pod/test/templates/ErrorIf.odt
Executable file → Normal file
0
pod/test/templates/FileHandlerImport.odt
Executable file → Normal file
0
pod/test/templates/FileHandlerImport.odt
Executable file → Normal file
0
pod/test/templates/ForCell.odt
Executable file → Normal file
0
pod/test/templates/ForCell.odt
Executable file → Normal file
0
pod/test/templates/ForCell2.odt
Executable file → Normal file
0
pod/test/templates/ForCell2.odt
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue