Commit 8582b77b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

now we use html extension everywhere, not htm. and also output better log in...

now we use html extension everywhere, not htm. and also output better log in case of unsupported format.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42452 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e290cc32
...@@ -56,7 +56,7 @@ class Manager(object): ...@@ -56,7 +56,7 @@ class Manager(object):
zip archive zip archive
""" """
if not mimemapper.getFilterList(destination_format): if not mimemapper.getFilterList(destination_format):
raise ValueError, "This format is not supported or is invalid" raise ValueError, "This format (%s) is not supported or is invalid" % destination_format
self.kw['zip'] = zip self.kw['zip'] = zip
self.kw['refresh'] = refresh self.kw['refresh'] = refresh
document = OOHandler(self._path_tmp_dir, document = OOHandler(self._path_tmp_dir,
...@@ -243,11 +243,8 @@ class Manager(object): ...@@ -243,11 +243,8 @@ class Manager(object):
try: try:
response_dict = {} response_dict = {}
# XXX - use html format instead of xhtml # XXX - use html format instead of xhtml
if orig_format in ("presentation", "graphics") and extension == "xhtml": if orig_format in ("presentation", "graphics", "spreadsheet", 'text') and extension == "xhtml":
extension = 'html' extension = 'html'
elif orig_format in ("spreadsheet", 'text') and extension in ("html",
"xhtml"):
extension = "htm"
response_dict['data'] = self.convertFile(data, response_dict['data'] = self.convertFile(data,
original_extension, original_extension,
extension, extension,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment