From f0f9b05fdde140bef86da55691a83cd215e1e14d Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Fri, 7 Sep 2012 02:58:34 +0200 Subject: [PATCH] dpi: try to fix unicode/str/bytes issue with old cython version --- kivy/properties.pxd | 2 +- kivy/properties.pyx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kivy/properties.pxd b/kivy/properties.pxd index f8ae80270..307c0c7ea 100644 --- a/kivy/properties.pxd +++ b/kivy/properties.pxd @@ -16,7 +16,7 @@ cdef class Property: cdef class NumericProperty(Property): cdef float parse_str(self, object obj, value) - cdef float parse_list(self, object obj, value, bytes ext) + cdef float parse_list(self, object obj, value, str ext) cdef class StringProperty(Property): pass diff --git a/kivy/properties.pyx b/kivy/properties.pyx index f07c53b08..057431dca 100644 --- a/kivy/properties.pyx +++ b/kivy/properties.pyx @@ -374,7 +374,7 @@ cdef class NumericProperty(Property): raise ValueError('%s.%s must have 2 components (got %r)' % ( obj.__class__.__name__, self.name, x)) - return self.parse_list(obj, x[0], x[1]) + return self.parse_list(obj, x[0], x[1]) elif tp is str: return self.parse_str(obj, x) else: @@ -383,9 +383,9 @@ cdef class NumericProperty(Property): self.name, x)) cdef float parse_str(self, object obj, value): - return self.parse_list(obj, value[:-2], value[-2:]) + return self.parse_list(obj, value[:-2], value[-2:]) - cdef float parse_list(self, object obj, value, bytes ext): + cdef float parse_list(self, object obj, value, str ext): # 1in = 2.54cm = 25.4mm = 72pt = 12pc global EventLoop if EventLoop is None: