Skip to content

Commit d571046

Browse files
hugovkByron
authored andcommitted
Remove redundant Python 2.4 code
1 parent c22f1b0 commit d571046

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

git/repo/base.py

Lines changed: 2 additions & 8 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy