Skip to content
Snippets Groups Projects
Commit 461c3571 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Added missing decoding from bytes to string in Python object interface

parent 4f542fa5
No related branches found
No related tags found
1 merge request!71.0.10 Python: 2 to 3, (dt,dt) / td division, mtime object interface
......@@ -17,7 +17,8 @@ def setCalendar(calendar_type):
libmtime.resetCalendar()
libmtime.setCalendar(calendar_type)
calendarToString = libmtime.calendarToString
def calendarToString():
return libmtime.calendarToString().decode()
class MTime (object):
'''\
......@@ -87,10 +88,10 @@ class DateTime (MTime):
return self._my
@property
def date(self):
return Date(libmtime.dateToString(ctypes.byref(self._my.contents.date)))
return Date(libmtime.dateToString(ctypes.byref(self._my.contents.date)).decode())
@property
def time(self):
return Time(libmtime.timeToString(ctypes.byref(self._my.contents.time)))
return Time(libmtime.timeToString(ctypes.byref(self._my.contents.time)).decode())
class TimeDelta (MTime):
def __init__(self, spec):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment