File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -364,13 +364,15 @@ def get_post_build_hook(self, toolchain_labels):
364
364
Positional Arguments:
365
365
hook - the hook object to add post-binary-hooks to
366
366
toolchain - the toolchain object for inspection
367
+
368
+ Return Value:
369
+ A callable if any post-build hook is applicable or None
367
370
"""
368
371
369
- # If there's no hook, simply return
370
372
try :
371
373
hook_data = self .post_binary_hook
372
374
except AttributeError :
373
- return
375
+ return None
374
376
# A hook was found. The hook's name is in the format
375
377
# "classname.functionname"
376
378
temp = hook_data ["function" ].split ("." )
@@ -403,7 +405,7 @@ def get_post_build_hook(self, toolchain_labels):
403
405
toolchain_restrictions = set (hook_data .get ("toolchains" , []))
404
406
if toolchain_restrictions and \
405
407
not set (toolchain_labels ).intersection (toolchain_restrictions ):
406
- return
408
+ return None
407
409
return getattr (cls , function_name )
408
410
409
411
################################################################################
You can’t perform that action at this time.
0 commit comments