File tree 1 file changed +5
-3
lines changed
azure_functions_worker/bindings
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def get_binding(bind_name: str, pytype: typing.Optional[type] = None) -> object:
46
46
# Check if binding is deferred binding
47
47
binding = get_deferred_binding (bind_name = bind_name , pytype = pytype )
48
48
# Binding is not deferred binding type
49
- if BINDING_REGISTRY is not None and binding is None :
49
+ if binding is None and BINDING_REGISTRY is not None :
50
50
binding = BINDING_REGISTRY .get (bind_name )
51
51
# Binding is generic
52
52
if binding is None :
@@ -216,9 +216,11 @@ def get_deferred_binding(bind_name: str,
216
216
pytype : typing .Optional [type ] = None ) -> object :
217
217
binding = None
218
218
219
+ if DEFERRED_BINDINGS_REGISTRY is None :
220
+ global DEFERRED_BINDINGS_ENABLED
221
+ DEFERRED_BINDINGS_ENABLED = False
219
222
# Checks if pytype is a supported sdk type
220
- if (DEFERRED_BINDINGS_REGISTRY is not None
221
- and DEFERRED_BINDINGS_REGISTRY .check_supported_type (pytype )):
223
+ elif DEFERRED_BINDINGS_REGISTRY .check_supported_type (pytype ):
222
224
# Returns deferred binding converter
223
225
binding = DEFERRED_BINDINGS_REGISTRY .get (bind_name )
224
226
You can’t perform that action at this time.
0 commit comments