Skip to content

Commit d0cba92

Browse files
committed
refactor: dont return result of resolver function
1 parent 6be0a1b commit d0cba92

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/lambda/handler-runner/python-runner/PythonRunner.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default class PythonRunner {
9999
// invoke.py, based on:
100100
// https://github.com/serverless/serverless/blob/v1.50.0/lib/plugins/aws/invokeLocal/invoke.py
101101
async run(event, context) {
102-
return new Promise((accept, reject) => {
102+
return new Promise((res, rej) => {
103103
const input = stringify({
104104
context,
105105
event,
@@ -117,11 +117,10 @@ export default class PythonRunner {
117117
if (parsed) {
118118
this.#handlerProcess.stdout.readline.removeListener('line', onLine)
119119
this.#handlerProcess.stderr.removeListener('data', onErr)
120-
return accept(parsed)
120+
res(parsed)
121121
}
122-
return null
123122
} catch (err) {
124-
return reject(err)
123+
rej(err)
125124
}
126125
}
127126

0 commit comments

Comments
 (0)