|
55 | 55 | execute_kwargs= {'istream','with_extended_output',
|
56 | 56 | 'with_exceptions','as_process','stdout_as_string',
|
57 | 57 | 'output_stream','with_stdout','kill_after_timeout',
|
58 |
| -'universal_newlines','shell','env','max_chunk_size','strip_newline'} |
| 58 | +'universal_newlines','shell','env','max_chunk_size','strip_newline_in_stdout'} |
59 | 59 |
|
60 | 60 | log=logging.getLogger(__name__)
|
61 | 61 | log.addHandler(logging.NullHandler())
|
@@ -738,7 +738,7 @@ def execute(self,
|
738 | 738 | shell:Union[None,bool]=None,
|
739 | 739 | env:Union[None,Mapping[str,str]]=None,
|
740 | 740 | max_chunk_size:int=io.DEFAULT_BUFFER_SIZE,
|
741 |
| -strip_newline:bool=True, |
| 741 | +strip_newline_in_stdout:bool=True, |
742 | 742 | **subprocess_kwargs:Any
|
743 | 743 | )->Union[str,bytes,Tuple[int,Union[str,bytes],str],AutoInterrupt]:
|
744 | 744 | """Handles executing the command on the shell and consumes and returns
|
@@ -811,8 +811,8 @@ def execute(self,
|
811 | 811 | effects on a repository. For example, stale locks in case of git gc could
|
812 | 812 | render the repository incapable of accepting changes until the lock is manually
|
813 | 813 | removed.
|
814 |
| - :paramstrip_newline: |
815 |
| - Whether to strip the trailing '\n' of the commandoutput. |
| 814 | + :paramstrip_newline_in_stdout: |
| 815 | + Whether to strip the trailing '\n' of the commandstdout. |
816 | 816 |
|
817 | 817 | :return:
|
818 | 818 | * str(output) if extended_output = False (Default)
|
@@ -947,7 +947,7 @@ def _kill_process(pid: int) -> None:
|
947 | 947 | ifnotuniversal_newlines:
|
948 | 948 | stderr_value=stderr_value.encode(defenc)
|
949 | 949 | # strip trailing "\n"
|
950 |
| -ifstdout_value.endswith(newline)andstrip_newline:# type: ignore |
| 950 | +ifstdout_value.endswith(newline)andstrip_newline_in_stdout:# type: ignore |
951 | 951 | stdout_value=stdout_value[:-1]
|
952 | 952 | ifstderr_value.endswith(newline):# type: ignore
|
953 | 953 | stderr_value=stderr_value[:-1]
|
|