Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd571046

Browse files
hugovkByron
authored andcommitted
Remove redundant Python 2.4 code
1 parentc22f1b0 commitd571046

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
importlogging
99
importos
1010
importre
11-
importsys
1211
importwarnings
1312

1413
fromgit.cmdimport (
@@ -40,11 +39,6 @@
4039

4140
log=logging.getLogger(__name__)
4241

43-
DefaultDBType=GitCmdObjectDB
44-
ifsys.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
returnblames
870864

871865
@classmethod
872-
definit(cls,path=None,mkdir=True,odbt=DefaultDBType,expand_vars=True,**kwargs):
866+
definit(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)

[8]ページ先頭

©2009-2025 Movatter.jp