diff options
author | Yobmod <yobmod@gmail.com> | 2021-08-08 21:42:34 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-08-08 21:42:34 +0100 |
commit | 38f5157253beb5801be80812e9b013a3cdd0bdc9 (patch) | |
tree | e75c305577966395857d15ff081beb9afe037828 /git/cmd.py | |
parent | 9d844a624b1cf207f0c379dc64f9b4767d89877d (diff) | |
download | gitpython-38f5157253beb5801be80812e9b013a3cdd0bdc9.tar.gz |
add type check to conf_encoding (in thoery could be bool or int)
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -109,18 +109,16 @@ def handle_process_output(process: 'Git.AutoInterrupt' | Popen, else: handler(line) except Exception as ex: - log.error(f"Pumping {name!r} of cmd({remove_password_if_present(cmdline)})} failed due to: {ex!r}") + log.error(f"Pumping {name!r} of cmd({remove_password_if_present(cmdline)}) failed due to: {ex!r}") raise CommandError([f'<{name}-pump>'] + remove_password_if_present(cmdline), ex) from ex finally: stream.close() - - if hasattr(process, 'proc'): process = cast('Git.AutoInterrupt', process) cmdline: str | Tuple[str, ...] | List[str] = getattr(process.proc, 'args', '') - p_stdout = process.proc.stdout - p_stderr = process.proc.stderr + p_stdout = process.proc.stdout if process.proc else None + p_stderr = process.proc.stderr if process.proc else None else: process = cast(Popen, process) cmdline = getattr(process, 'args', '') |