From 76f5a60a9b9217519be132ad7fc86eb439ae9a3f Mon Sep 17 00:00:00 2001 From: ZyX Date: Wed, 7 Jan 2015 05:02:08 +0300 Subject: [PATCH] Fix `TypeError` in Python-3.2 This code may raise TypeError: string argument without an encoding --- powerline/bindings/zsh/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/bindings/zsh/__init__.py b/powerline/bindings/zsh/__init__.py index 2c320485..b4f19f2c 100644 --- a/powerline/bindings/zsh/__init__.py +++ b/powerline/bindings/zsh/__init__.py @@ -57,7 +57,7 @@ class Args(object): return None else: if isinstance(ret, (unicode, str, bytes)): - return ret.split(type(ret)(':')) + return ret.split((b':' if isinstance(ret, bytes) else ':')) else: return ret