From 4e350074861ff82390ec6de93653acc4487fa3cf Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Feb 2014 01:16:29 +0400 Subject: [PATCH 1/3] Home may be None, respect it --- powerline/segments/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerline/segments/common.py b/powerline/segments/common.py index 8ddc8a9c..b2311f16 100644 --- a/powerline/segments/common.py +++ b/powerline/segments/common.py @@ -101,8 +101,9 @@ def cwd(pl, segment_info, dir_shorten_len=None, dir_limit_depth=None, use_path_s cwd = "[not found]" else: raise - home = u(segment_info['home']) + home = segment_info['home'] if home: + home = u(home) cwd = re.sub('^' + re.escape(home), '~', cwd, 1) cwd_split = cwd.split(os.sep) cwd_split_len = len(cwd_split) From 5e4daed72bf87a1754e86fc6a2945d3866ab0a9a Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Feb 2014 01:16:48 +0400 Subject: [PATCH 2/3] Install bazaar with --allow-external --- tests/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/install.sh b/tests/install.sh index ab666a81..bede6ac7 100755 --- a/tests/install.sh +++ b/tests/install.sh @@ -3,7 +3,8 @@ pip install . pip install psutil if python -c 'import sys; sys.exit(1 * (sys.version_info[0] != 2))' ; then # Python 2 - pip install mercurial bzr + pip install mercurial + pip install --allow-external bzr bzr if python -c 'import sys; sys.exit(1 * (sys.version_info[1] >= 7))' ; then # Python 2.6 pip install unittest2 argparse From 773d6a6600d111a40471492c4e0955a6eb56713c Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 9 Feb 2014 01:25:18 +0400 Subject: [PATCH 3/3] Also use --allow-unverified --- tests/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install.sh b/tests/install.sh index bede6ac7..510e6a96 100755 --- a/tests/install.sh +++ b/tests/install.sh @@ -4,7 +4,7 @@ pip install psutil if python -c 'import sys; sys.exit(1 * (sys.version_info[0] != 2))' ; then # Python 2 pip install mercurial - pip install --allow-external bzr bzr + pip install --allow-external bzr --allow-unverified bzr bzr if python -c 'import sys; sys.exit(1 * (sys.version_info[1] >= 7))' ; then # Python 2.6 pip install unittest2 argparse