From f4cd8e946a9b2a874deb1024c6b2e62358f6e537 Mon Sep 17 00:00:00 2001 From: Roopesh V S Date: Sun, 23 Aug 2020 16:34:14 +0530 Subject: [PATCH] Beautiful Soup issue fix --- fire/decorators.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fire/decorators.py b/fire/decorators.py index b7b3c660..890906af 100644 --- a/fire/decorators.py +++ b/fire/decorators.py @@ -90,7 +90,11 @@ def GetMetadata(fn): default = { ACCEPTS_POSITIONAL_ARGS: inspect.isroutine(fn), } - return getattr(fn, FIRE_METADATA, default) + try: + if ACCEPTS_POSITIONAL_ARGS in getattr(fn, FIRE_METADATA, default): + return getattr(fn, FIRE_METADATA, default) + except: + return default def GetParseFns(fn):