Skip to content

Commit 4107474

Browse files
committed
Attempt to fix broken build
For now this means no more Python 2.6 support (it doesn't have `subprocess.check_output` and doesn't support `assertRaises` as a context manager).
1 parent 3527b7c commit 4107474

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ sudo: false
22
cache: pip
33
language: python
44
python:
5+
- "3.5-dev"
56
- "3.4"
67
- "3.3"
78
- "2.7"
8-
- "2.6"
99
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
1010
install:
1111
# Setup of Git environment

PyGitUp/gitup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_git_dir():
9797
if os.path.isdir(git_dir):
9898
return abspath
9999
else:
100-
return execute('git rev-parse --show-toplevel')
100+
return execute(['git', 'rev-parse', '--show-toplevel'])
101101

102102

103103
class GitUp(object):

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ to either:
5959

6060
Otherwise pip will refuse to install ``git-up`` due to ``Access denied`` errors.
6161

62-
Python 3 compatibility:
63-
~~~~~~~~~~~~~~~~~~~~~~~
62+
Python version compatibility:
63+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6464

65-
Python 3.3 and 3.4 are supported :)
65+
Python 2.7, 3.3 and 3.4 are supported :)
6666

6767
Options and Configuration
6868
-------------------------

tests/test_git_not_in_path.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ def test_not_a_git_repo():
2323
environ = os.environ.copy()
2424
os.environ['PATH'] = ''
2525

26-
with assert_raises(GitError) as e:
27-
from PyGitUp.gitup import GitUp
28-
GitUp(testing=True)
26+
try:
27+
with assert_raises(GitError) as e:
28+
from PyGitUp.gitup import GitUp
29+
GitUp(testing=True)
2930

30-
assert e.exception.message == "The git executable could not be found"
31+
assert e.exception.message == "The git executable could not be found"
3132

32-
os.environ.update(environ)
33+
finally:
34+
os.environ.update(environ)

0 commit comments

Comments
 (0)