@@ -18,21 +18,11 @@ API: exceptions
1818
1919 Base class for process call errors.
2020
21- .. py :exception :: ExecHelperTimeoutError(ExecCalledProcessError)
21+ class ExecHelperTimeoutProcessError(ExecCalledProcessError):
22+
23+ Timeout based errors.
2224
23- Execution timeout.
24-
25- .. versionchanged :: 1.3.0 provide full result and timeout inside.
26- .. versionchanged :: 1.3.0 subclass ExecCalledProcessError
27-
28- .. py :method :: __init__ (self , result, timeout)
29-
30- Exception for error on process calls.
31-
32- :param result: execution result
33- :type result: exec_result.ExecResult
34- :param timeout: timeout for command
35- :type timeout: typing.Union[int, float]
25+ .. versionadded :: 2.11.0
3626
3727 .. py :attribute :: timeout
3828
@@ -54,18 +44,54 @@ API: exceptions
5444 ``typing.Text ``
5545 stdout string or brief string
5646
47+
48+ .. py :exception :: ExecHelperNoKillError(ExecHelperTimeoutProcessError)
49+
50+ Impossible to kill process.
51+
52+ .. versionadded :: 2.11.0
53+
54+ .. py :method :: __init__ (self , result, timeout)
55+
56+ Exception for error on process calls.
57+
58+ :param result: execution result
59+ :type result: ExecResult
60+ :param timeout: timeout for command
61+ :type timeout: typing.Union[int, float]
62+
63+
64+ .. py :exception :: ExecHelperTimeoutError(ExecHelperTimeoutProcessError)
65+
66+ Execution timeout.
67+
68+ .. versionchanged :: 1.3.0 provide full result and timeout inside.
69+ .. versionchanged :: 1.3.0 subclass ExecCalledProcessError
70+
71+ .. py :method :: __init__ (self , result, timeout)
72+
73+ Exception for error on process calls.
74+
75+ :param result: execution result
76+ :type result: ExecResult
77+ :param timeout: timeout for command
78+ :type timeout: typing.Union[int, float]
79+
80+
5781.. py :exception :: CalledProcessError(ExecCalledProcessError)
5882
5983 Exception for error on process calls.
6084
6185 .. versionchanged :: 1.1.1 - provide full result
6286
63- .. py :method :: __init__ (result, expected = None )
87+ .. py :method :: __init__ (result, expected = ( 0 ,) )
6488
6589 :param result: execution result
6690 :type result: ExecResult
67- :param returncode: return code
68- :type returncode: typing.Union[int, ExitCodes]
91+ :param expected: expected return codes
92+ :type expected: typing.Iterable[typing.Union[int, ExitCodes]]
93+
94+ .. versionchanged :: 2.11.0 Expected is not optional, defaults os dependent
6995
7096 .. py :attribute :: result
7197
@@ -104,7 +130,7 @@ API: exceptions
104130
105131 Exception during parallel execution.
106132
107- .. py :method :: __init__ (command, errors, results, expected = None , )
133+ .. py :method :: __init__ (command, errors, results, expected = ( 0 ,) , )
108134
109135 :param command: command
110136 :type command: ``str ``
@@ -113,9 +139,10 @@ API: exceptions
113139 :param results: all results
114140 :type results: typing.Dict[typing.Tuple[str, int], ExecResult]
115141 :param expected: expected return codes
116- :type expected: typing.Optional [typing.List[typing.List[typing. Union[int, ExitCodes] ]]
142+ :type expected: typing.Iterable [typing.Union[int, ExitCodes]]
117143
118144 .. versionchanged :: 1.0 - fixed inheritance
145+ .. versionchanged :: 2.11.0 Expected is not optional, defaults os dependent
119146
120147 .. py :attribute :: cmd
121148
@@ -144,7 +171,7 @@ API: exceptions
144171
145172 Exception raised during parallel call as result of exceptions.
146173
147- .. py :method :: __init__ (command, exceptions, errors, results, expected = None , )
174+ .. py :method :: __init__ (command, exceptions, errors, results, expected = ( 0 ,) , )
148175
149176 :param command: command
150177 :type command: ``str ``
@@ -155,9 +182,10 @@ API: exceptions
155182 :param results: all results
156183 :type results: typing.Dict[typing.Tuple[str, int], ExecResult]
157184 :param expected: expected return codes
158- :type expected: typing.Optional [typing.List[typing.List[typing. Union[int, ExitCodes] ]]
185+ :type expected: typing.Iterable [typing.Union[int, ExitCodes]]
159186
160187 .. versionchanged :: 1.0 - fixed inheritance
188+ .. versionchanged :: 2.11.0 Expected is not optional, defaults os dependent
161189
162190 .. py :attribute :: cmd
163191
0 commit comments