1
0
forked from VimPlug/jedi

fix a few debugging problems

This commit is contained in:
David Halter
2013-08-11 20:10:52 +04:30
parent a72601a9d8
commit f93226420e
2 changed files with 4 additions and 2 deletions

View File

@@ -168,6 +168,8 @@ def u(string):
have to cast back to a unicode (and we now that we always deal with valid have to cast back to a unicode (and we now that we always deal with valid
unicode, because we check that in the beginning). unicode, because we check that in the beginning).
""" """
if not is_py3k and not isinstance(string, unicode): if is_py3k:
return str(string)
elif not isinstance(string, unicode):
return unicode(str(string), 'UTF-8') return unicode(str(string), 'UTF-8')
return string return string

View File

@@ -48,7 +48,7 @@ def warning(*args):
def speed(name): def speed(name):
if debug_function and enable_speed: if debug_function and enable_speed:
now = time.time() now = time.time()
debug_function(SPEED, 'speed: ' + '%s %s' % (u(name), now - start_time)) debug_function(SPEED, 'speed: ' + '%s %s' % (name, now - start_time))
def print_to_stdout(level, str_out): def print_to_stdout(level, str_out):