Skip to content

Commit 1906ee4

Browse files
committed
Fixed compatability issues with python 2.5, made sure all tests run
1 parent 1e2b461 commit 1906ee4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/git/odb/db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def to_objects(self, iter_info, dry_run=False, sha_as_hex=True, max_threads=0):
101101
# actually use multiple threads, default False of course. If the add
102102
shas = list()
103103
for args in iter_info:
104-
shas.append(self.to_object(*args, dry_run=dry_run, sha_as_hex=sha_as_hex))
104+
shas.append(self.to_object(dry_run=dry_run, sha_as_hex=sha_as_hex, *args))
105105
return shas
106106

107107
#} END edit interface
@@ -155,7 +155,7 @@ def __init__(self, root_path):
155155
# Additional Flags - might be set to 0 after the first failure
156156
# Depending on the root, this might work for some mounts, for others not, which
157157
# is why it is per instance
158-
self._fd_open_flags = os.O_NOATIME
158+
self._fd_open_flags = getattr(os, 'O_NOATIME', 0)
159159

160160
#{ Interface
161161
def object_path(self, hexsha):

test/git/performance/lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ def setUpAll(cls):
6060

6161
@classmethod
6262
def tearDownAll(cls):
63-
shutil.rmtree(cls.gitrwrepo.working_tree_dir)
63+
shutil.rmtree(cls.gitrwrepo.working_dir)
6464

6565
#} END base classes

test/git/test_repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_commits(self):
7373
assert_equal("[email protected]", c.committer.email)
7474
assert_equal(1232829715, c.committed_date)
7575
assert_equal(5*3600, c.committer_tz_offset)
76-
assert_equal("Bumped version 0.1.6", c.message)
76+
assert_equal("Bumped version 0.1.6\n", c.message)
7777

7878
c = commits[1]
7979
assert isinstance(c.parents, tuple)

0 commit comments

Comments
 (0)