mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Use isinstance instead of type() comparisons. isinstance is more robust
This commit is contained in:
@@ -144,7 +144,7 @@ class Debugger(cmd.Cmd):
|
||||
exec(code, globals(), self.scope)
|
||||
except:
|
||||
t, v = sys.exc_info()[:2]
|
||||
if type(t) == type(''):
|
||||
if isinstance(t, str):
|
||||
exc_type_name = t
|
||||
else:
|
||||
exc_type_name = t.__name__
|
||||
|
||||
Reference in New Issue
Block a user