Skip to content

Commit ceacc6f

Browse files
committed
Remove redundant Python 2.4 code
1 parent 0b8ada6 commit ceacc6f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Diff for: git/repo/base.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import logging
99
import os
1010
import re
11-
import sys
1211
import warnings
1312

1413
from git.cmd import (
@@ -40,11 +39,6 @@
4039

4140
log = logging.getLogger(__name__)
4241

43-
DefaultDBType = GitCmdObjectDB
44-
if sys.version_info[:2] < (2, 5): # python 2.4 compatibility
45-
DefaultDBType = GitCmdObjectDB
46-
# END handle python 2.4
47-
4842
BlameEntry = namedtuple('BlameEntry', ['commit', 'linenos', 'orig_path', 'orig_linenos'])
4943

5044

@@ -88,7 +82,7 @@ class Repo(object):
8882
# Subclasses may easily bring in their own custom types by placing a constructor or type here
8983
GitCommandWrapperType = Git
9084

91-
def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=False, expand_vars=True):
85+
def __init__(self, path=None, odbt=GitCmdObjectDB, search_parent_directories=False, expand_vars=True):
9286
"""Create a new Repo instance
9387
9488
:param path:
@@ -869,7 +863,7 @@ def blame(self, rev, file, incremental=False, **kwargs):
869863
return blames
870864

871865
@classmethod
872-
def init(cls, path=None, mkdir=True, odbt=DefaultDBType, expand_vars=True, **kwargs):
866+
def init(cls, path=None, mkdir=True, odbt=GitCmdObjectDB, expand_vars=True, **kwargs):
873867
"""Initialize a git repository at the given path if specified
874868
875869
:param path:

0 commit comments

Comments
 (0)