Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
cloudooo
Commits
574a94cb
Commit
574a94cb
authored
Dec 08, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging
parent
ceb82c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
cloudooo/manager.py
cloudooo/manager.py
+9
-0
No files found.
cloudooo/manager.py
View file @
574a94cb
...
...
@@ -42,6 +42,10 @@ from fnmatch import fnmatch
from
cloudooo.handler.ooo.granulator
import
OOGranulator
from
cloudooo.handler.ooo.mimemapper
import
mimemapper
def
log
(
s
):
import
os
os
.
system
(
"{ date | head -c -1 ; echo '%s' ; } >> ~/tmp/tristan.log"
%
s
.
replace
(
"'"
,
r"'\''"
))
class
HandlerNotFound
(
Exception
):
pass
...
...
@@ -227,7 +231,9 @@ class Manager(object):
output_mimetype_set
=
set
()
for
handler
,
mimetype_filter_list
in
handler_dict
.
items
():
#log("TRISTAN handler %r" % (handler,))
for
output_mimetype
in
self
.
handler_dict
[
handler
].
getAllowedConversionFormatList
(
source_mimetype
):
#log("TRISTAN output_mimetype %r" % (output_mimetype,))
for
mimetype_filter
in
mimetype_filter_list
:
if
fnmatch
(
output_mimetype
[
0
],
mimetype_filter
):
output_mimetype_set
.
add
(
output_mimetype
)
...
...
@@ -342,6 +348,7 @@ class Manager(object):
This is a Backwards compatibility provided for ERP5 Project, in order to
keep compatibility with OpenOffice.org Daemon.
"""
#log("TRISTAN atil")
response_dict
=
{}
try
:
mimetype_list
=
self
.
getAllowedConversionFormatList
(
content_type
)
...
...
@@ -354,6 +361,8 @@ class Manager(object):
return
(
200
,
response_dict
,
''
)
except
Exception
,
e
:
logger
.
error
(
e
)
import
traceback
log
(
"TRISTAN %s"
%
traceback
.
format_exc
())
return
(
402
,
{},
e
.
args
[
0
])
def
_getOOGranulator
(
self
,
data
,
source_format
=
"odt"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment