Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Vincent Bechu
cloudooo
Commits
1346047c
Commit
1346047c
authored
Jan 16, 2012
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create response_dict with key mime to avoid KeyError on the ERP5 side
parent
2e71cb0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
cloudooo/manager.py
cloudooo/manager.py
+1
-3
No files found.
cloudooo/manager.py
View file @
1346047c
...
@@ -250,8 +250,8 @@ class Manager(object):
...
@@ -250,8 +250,8 @@ class Manager(object):
zip
=
True
zip
=
True
else
:
else
:
zip
=
False
zip
=
False
response_dict
=
dict
(
mime
=
mimetypes
.
types_map
.
get
(
'.%s'
%
extension
))
try
:
try
:
response_dict
=
{}
# XXX - use html format instead of xhtml
# XXX - use html format instead of xhtml
if
orig_format
in
(
"presentation"
,
if
orig_format
in
(
"presentation"
,
"graphics"
,
"graphics"
,
...
@@ -267,8 +267,6 @@ class Manager(object):
...
@@ -267,8 +267,6 @@ class Manager(object):
response_dict
[
'mime'
]
=
"application/zip"
response_dict
[
'mime'
]
=
"application/zip"
elif
extension
==
'xhtml'
:
elif
extension
==
'xhtml'
:
response_dict
[
'mime'
]
=
"text/html"
response_dict
[
'mime'
]
=
"text/html"
else
:
response_dict
[
'mime'
]
=
mimetypes
.
types_map
.
get
(
'.%s'
%
extension
)
return
(
200
,
response_dict
,
""
)
return
(
200
,
response_dict
,
""
)
except
Exception
,
e
:
except
Exception
,
e
:
logger
.
error
(
e
)
logger
.
error
(
e
)
...
...
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