Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git-{cola,dag}: Simplify setting up sys.path for the install tree

Signed-off-by: David Aguilar <davvid@gmail.com>
  • Loading branch information...
commit be8baf91be0ca10ed3ec5a2c1e49b32cb3b0d62d 1 parent 7d5842a
@davvid davvid authored
Showing with 5 additions and 4 deletions.
  1. +3 −2 bin/git-cola
  2. +2 −2 bin/git-dag
View
5 bin/git-cola
@@ -26,6 +26,7 @@ def cola_init():
# It is assumed that the user installed Cola using the --prefix= option
prefix = os.path.dirname(os.path.dirname(
os.path.realpath(os.path.abspath(__file__))))
+
# Look for modules in the source or install trees
cola_mod = os.path.join(prefix, 'cola', '__init__.py')
if os.path.exists(cola_mod):
@@ -33,8 +34,8 @@ def cola_init():
sys.path.insert(1, prefix)
else:
# Install tree
- paths_to_try = [os.path.join(prefix, 'share', 'git-cola', 'lib')]
- sys.path = paths_to_try + sys.path
+ install_lib = os.path.join(prefix, 'share', 'git-cola', 'lib')
+ sys.path.insert(1, install_lib)
if __name__ == '__main__':
View
4 bin/git-dag
@@ -34,8 +34,8 @@ def cola_init():
sys.path.insert(1, prefix)
else:
# Install tree
- paths_to_try = [os.path.join(prefix, 'share', 'git-cola', 'lib')]
- sys.path = paths_to_try + sys.path
+ install_lib = os.path.join(prefix, 'share', 'git-cola', 'lib')
+ sys.path.insert(1, install_lib)
if __name__ == '__main__':
Please sign in to comment.
Something went wrong with that request. Please try again.