attmpt 5
This commit is contained in:
parent
76266b6163
commit
de9d31bc0d
1 changed files with 3 additions and 2 deletions
|
|
@ -107,11 +107,12 @@ class LambdaFunction(object):
|
|||
|
||||
def _invoke_lambda(self, code, event={}, context={}):
|
||||
# TO DO: context not yet implemented
|
||||
mycode = "\n".join([self.code, 'print lambda_handler(%s, %s)' % (event, context)])
|
||||
#print "moto_lambda_debug: ", mycode
|
||||
|
||||
try:
|
||||
codeOut = StringIO()
|
||||
codeErr = StringIO()
|
||||
mycode = "\n".join([self.code, 'print lambda_handler(%s, %s)' % (event, context)])
|
||||
#print "moto_lambda_debug: ", mycode
|
||||
sys.stdout = codeOut
|
||||
sys.stderr = codeErr
|
||||
exec(mycode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue