Skip to content

Commit d32346d

Browse files
committed
issue #127, concurrent: wrap errors when reading from pipe
Signed-off-by: Matteo Cafasso <[email protected]>
1 parent 40a15ca commit d32346d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pebble/asynchronous/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async def _get_result(
163163
except (EOFError, OSError):
164164
return Result(ERROR, ProcessExpired('Abnormal termination'))
165165
except Exception as error:
166-
return error
166+
return Result(ERROR, error)
167167

168168

169169
def _function_handler(

pebble/concurrent/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def _get_result(
179179
except (EOFError, OSError):
180180
return Result(ERROR, ProcessExpired('Abnormal termination'))
181181
except Exception as error:
182-
return error
182+
return Result(ERROR, error)
183183

184184

185185
def _validate_parameters(

0 commit comments

Comments
 (0)