milkbikis/powerline-bash — pull request #5 by mindjiver (2012-09-10 19:34:36+00:00)
Title: Catch OSError when spawning subprocess.

I didn't have svn installed on my machine so it exploded with:

Traceback (most recent call last):
File "/Users/pjn/powerline-bash.py", line 128, in
add_svn_segment(p)
File "/Users/pjn/powerline-bash.py", line 88, in add_svn_segment
p1 = subprocess.Popen(['svn', 'status'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1228, in _execute_child
OSError: [Errno 2] No such file or directory

Maybe there is a cleaner way to fix this, but it did the trick.