mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Fix compatibility between python2 and 3
This commit is contained in:
parent
6c40f5e24a
commit
a631c8c761
5 changed files with 18 additions and 11 deletions
|
@ -103,7 +103,8 @@ class Item(object):
|
|||
self.text = self.text.replace(
|
||||
"\nEND:", "\nX-RADICALE-NAME:%s\nEND:" % self._name)
|
||||
else:
|
||||
self._name = str(uuid4())
|
||||
# workaround to get unicode on both python2 and 3
|
||||
self._name = uuid4().hex.encode("ascii").decode("ascii")
|
||||
self.text = self.text.replace(
|
||||
"\nEND:", "\nX-RADICALE-NAME:%s\nEND:" % self._name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue