You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
universal_newlines is not respected if git process times out #1116
Can you be more specific as to allow a PR to be created? In that moment I request a change of the subject as well.
This issue isn't currently actionable.
This issue will be reopened once the requested information was provided.
If we run operation long enough to be killed after timeout and use universal_newlines set to True as this
from git.cmd import Git
g = Git(r'/path/to/repo')
g.rev_list('HEAD', kill_after_timeout=1e-6, universal_newlines=True)
script execution stopped with traceback
Traceback (most recent call last):
File "../src/test.py", line 28, in <module>
g.rev_list('HEAD', kill_after_timeout=1e-6, universal_newlines=True)
File "/venv/path/lib64/python3.6/site-packages/git/cmd.py", line 542, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/venv/path/lib64/python3.6/site-packages/git/cmd.py", line 1006, in _call_process
return self.execute(call, **exec_kwargs)
File "/venv/path/lib64/python3.6/site-packages/git/cmd.py", line 789, in execute
if stderr_value.endswith(newline):
TypeError: endswith first arg must be bytes or a tuple of bytes, not str
because stderr_value is an error message about timeout decoded to bytes, but with universal_newlines = True newline is str, not bytes.
Activity
Byron commentedon Jan 28, 2021
Can you be more specific as to allow a PR to be created? In that moment I request a change of the subject as well.
This issue isn't currently actionable.
This issue will be reopened once the requested information was provided.
x-santiaga-x commentedon Jan 28, 2021
If we run operation long enough to be killed after timeout and use universal_newlines set to True as this
script execution stopped with traceback
because stderr_value is an error message about timeout decoded to bytes, but with universal_newlines = True newline is str, not bytes.
[-]Yet another universal_newlines TypeError[/-][+]`universal_newlines` is not respected if git process times out[/+]Byron commentedon Jan 28, 2021
Thanks a lot! This looks like the logic here needs to adhere to the universal newlines flag. Would you be able to submit a PR for a fix?
fix universal_newlines TypeError