summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-19 16:55:03 +0100
committerYobmod <yobmod@gmail.com>2021-07-19 16:55:03 +0100
commitac39679ce170c5eb21f98ac23ac0358850e8974f (patch)
tree0a552c49d9358dffcb2272c42fa4c8d50acda2fe /git/cmd.py
parent8fc25c63d9282ddc6b3162c2d92679a89e934ec5 (diff)
downloadgitpython-ac39679ce170c5eb21f98ac23ac0358850e8974f.tar.gz
Make types in refs compatible with previous
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/git/cmd.py b/git/cmd.py
index dd887a18..11c02afe 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -15,7 +15,6 @@ from subprocess import (
PIPE
)
import subprocess
-import sys
import threading
from textwrap import dedent
@@ -539,7 +538,7 @@ class Git(LazyMixin):
return self
def __next__(self) -> bytes:
- return self.next()
+ return next(self)
def next(self) -> bytes:
line = self.readline()
@@ -799,10 +798,7 @@ class Git(LazyMixin):
if kill_after_timeout:
raise GitCommandError(redacted_command, '"kill_after_timeout" feature is not supported on Windows.')
else:
- if sys.version_info[0] > 2:
- cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
- else:
- cmd_not_found_exception = OSError
+ cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable
# end handle
stdout_sink = (PIPE
@@ -1070,8 +1066,8 @@ class Git(LazyMixin):
It contains key-values for the following:
- the :meth:`execute()` kwds, as listed in :var:`execute_kwargs`;
- "command options" to be converted by :meth:`transform_kwargs()`;
- - the `'insert_kwargs_after'` key which its value must match one of ``*args``,
- and any cmd-options will be appended after the matched arg.
+ - the `'insert_kwargs_after'` key which its value must match one of ``*args``
+ and any cmd-options will be appended after the matched arg.
Examples::