Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
d1c953c97d39
Commit
32ed77ff
authored
Mar 05, 2020
by
Simon Chabot
Browse files
[fix, calendar] Ensure that the buffer is a string
'unicode' is not defined in python3 --HG-- branch : 3.26
parent
b748fa6b5796
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb/web/views/calendar.py
View file @
d1c953c9
...
...
@@ -23,6 +23,7 @@ from cubicweb import _
import
copy
from
datetime
import
timedelta
import
six
from
logilab.mtconverter
import
xml_escape
from
logilab.common.date
import
todatetime
...
...
@@ -100,9 +101,7 @@ try:
if
ical_task
.
stop
:
elt
.
add
(
stop_kw
).
value
=
ical_task
.
stop
buff
=
ical
.
serialize
()
if
not
isinstance
(
buff
,
unicode
):
buff
=
unicode
(
buff
,
self
.
_cw
.
encoding
)
buff
=
six
.
ensure_str
(
ical
.
serialize
(),
encoding
=
self
.
_cw
.
encoding
)
self
.
w
(
buff
)
except
ImportError
:
...
...
Write
Preview
Supports
Markdown
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