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

Fix issue #470#475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 1 commit intogitpython-developers:masterfromwarsaw:issue470
Jun 20, 2016
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletionsgit/cmd.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,8 @@
PY3,
bchr,
# just to satisfy flake8 on py3
unicode
unicode,
safe_decode,
)

execute_kwargs = ('istream', 'with_keep_cwd', 'with_extended_output',
Expand DownExpand Up@@ -693,12 +694,12 @@ def _kill_process(pid):
cmdstr = " ".join(command)

def as_text(stdout_value):
return not output_stream andstdout_value.decode(defenc) or '<OUTPUT_STREAM>'
return not output_stream andsafe_decode(stdout_value) or '<OUTPUT_STREAM>'
# end

if stderr_value:
log.info("%s -> %d; stdout: '%s'; stderr: '%s'",
cmdstr, status, as_text(stdout_value),stderr_value.decode(defenc))
cmdstr, status, as_text(stdout_value),safe_decode(stderr_value))
elif stdout_value:
log.info("%s -> %d; stdout: '%s'", cmdstr, status, as_text(stdout_value))
else:
Expand All@@ -712,11 +713,11 @@ def as_text(stdout_value):
raise GitCommandError(command, status, stderr_value)

if isinstance(stdout_value, bytes) and stdout_as_string: # could also be output_stream
stdout_value =stdout_value.decode(defenc)
stdout_value =safe_decode(stdout_value)

# Allow access to the command's status code
if with_extended_output:
return (status, stdout_value,stderr_value.decode(defenc))
return (status, stdout_value,safe_decode(stderr_value))
else:
return stdout_value

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp