We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f92aace commit b7dfca2Copy full SHA for b7dfca2
lambda_gateway/event_proxy.py
@@ -1,8 +1,8 @@
1
import asyncio
2
-import importlib
3
import json
4
import os
5
import sys
+from importlib.util import (spec_from_file_location, module_from_spec)
6
7
from lambda_gateway import lambda_context
8
@@ -24,8 +24,8 @@ def get_handler(self):
24
raise ValueError(f"Bad handler signature '{self.handler}'")
25
try:
26
pypath = os.path.join(os.path.curdir, f'{name}.py')
27
- spec = importlib.util.spec_from_file_location(name, pypath)
28
- module = importlib.util.module_from_spec(spec)
+ spec = spec_from_file_location(name, pypath)
+ module = module_from_spec(spec)
29
spec.loader.exec_module(module)
30
return getattr(module, func)
31
except FileNotFoundError:
0 commit comments