Skip to content

Commit 6507e4e

Browse files
committed
fixes python 2.6 compatibility issues
1 parent bf638fd commit 6507e4e

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

git/db/interface.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ def __init__(self, root_path):
150150
:note: The base will not perform any accessablity checking as the base
151151
might not yet be accessible, but become accessible before the first
152152
access."""
153-
super(RootPathDB, self).__init__(root_path)
153+
try:
154+
super(RootPathDB, self).__init__(root_path)
155+
except TypeError:
156+
pass
157+
# END handle py 2.6
154158

155159
#{ Interface
156160
def root_path(self):

git/db/py/base.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ def partial_to_complete_sha_hex(self, partial_hexsha):
7474
class PureObjectDBW(ObjectDBW):
7575

7676
def __init__(self, *args, **kwargs):
77-
super(PureObjectDBW, self).__init__(*args, **kwargs)
77+
try:
78+
super(PureObjectDBW, self).__init__(*args, **kwargs)
79+
except TypeError:
80+
pass
81+
#END handle py 2.6
7882
self._ostream = None
7983

8084
#{ Edit Interface
@@ -352,7 +356,11 @@ class PureConfigurationMixin(ConfigurationMixin):
352356

353357
def __init__(self, *args, **kwargs):
354358
"""Verify prereqs"""
355-
super(PureConfigurationMixin, self).__init__(*args, **kwargs)
359+
try:
360+
super(PureConfigurationMixin, self).__init__(*args, **kwargs)
361+
except TypeError:
362+
pass
363+
#END handle code-breaking change in python 2.6
356364
assert hasattr(self, 'git_dir')
357365

358366
def _path_at_level(self, level ):

0 commit comments

Comments
 (0)