Skip to content

Commit

Permalink
corrected minor mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-morel committed Jul 26, 2024
1 parent da89655 commit b53dc6c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/build/lib/comberload.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ def call(self, *args, **kw):
The default call for comberloaded instance, calla the
fallback if given, else returns None
"""
handle = (self._fallback or self._failback)
if handle is None:
if self._fallback is None:
return None
return handle(*args, **kw)
return self._fallback(*args, **kw)

def fallback(self, func: Callable):
"""
Expand All @@ -100,7 +99,7 @@ def failback(self, func: Callable):
incomplete
"""
self._fail = func
self._callback = func
self._fallback = func
return func

def __call__(self, *args, **kw):
Expand Down

0 comments on commit b53dc6c

Please sign in to comment.