summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2017-12-05 10:40:00 +0200
committerSebastian Thiel <byronimo@gmail.com>2017-12-11 15:24:59 +0100
commitd5710466a728446d8169761d9d4c29b1cb752b00 (patch)
tree425bf23c97b3a2680ed0c3fc82af9aa96af18b5e
parentc22f1b05fee73dd212c470fecf29a0df9e25a18f (diff)
downloadgitpython-d5710466a728446d8169761d9d4c29b1cb752b00.tar.gz
Remove redundant Python 2.4 code
-rw-r--r--git/repo/base.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index 2fbae012..a477bf38 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -8,7 +8,6 @@ from collections import namedtuple
import logging
import os
import re
-import sys
import warnings
from git.cmd import (
@@ -40,11 +39,6 @@ import gitdb
log = logging.getLogger(__name__)
-DefaultDBType = GitCmdObjectDB
-if sys.version_info[:2] < (2, 5): # python 2.4 compatibility
- DefaultDBType = GitCmdObjectDB
-# END handle python 2.4
-
BlameEntry = namedtuple('BlameEntry', ['commit', 'linenos', 'orig_path', 'orig_linenos'])
@@ -88,7 +82,7 @@ class Repo(object):
# Subclasses may easily bring in their own custom types by placing a constructor or type here
GitCommandWrapperType = Git
- def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=False, expand_vars=True):
+ def __init__(self, path=None, odbt=GitCmdObjectDB, search_parent_directories=False, expand_vars=True):
"""Create a new Repo instance
:param path:
@@ -869,7 +863,7 @@ class Repo(object):
return blames
@classmethod
- def init(cls, path=None, mkdir=True, odbt=DefaultDBType, expand_vars=True, **kwargs):
+ def init(cls, path=None, mkdir=True, odbt=GitCmdObjectDB, expand_vars=True, **kwargs):
"""Initialize a git repository at the given path if specified
:param path: