8000
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 46d2149 commit ba6a869Copy full SHA for ba6a869
src/functions_framework/__init__.py
@@ -247,14 +247,13 @@ def handle_none(rv):
247
app.make_response = handle_none
248
249
# Extract the target function from the source file
250
- try:
251
- function = getattr(source_module, target)
252
- except AttributeError:
+ if not hasattr(source_module, target):
253
raise MissingTargetException(
254
"File {source} is expected to contain a function named {target}".format(
255
source=source, target=target
256
)
257
+ function = getattr(source_module, target)
258
259
# Check that it is a function
260
if not isinstance(function, types.FunctionType):
0 commit comments