You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the load function of vinegar.py I see the following code:
if instantiate_custom_exceptions:
if modname in sys.modules:
cls = getattr(sys.modules[modname], clsname, None)
elif not is_py3k and modname == "builtins":
cls = getattr(exceptions_module, clsname, None)
else:
cls = None
The second if statement looks suspicious because it will never be true.
Furter below in the same function I see the following code:
if not isinstance(cls, (type, ClassType)):
cls = None
elif issubclass(cls, ClassType) and not instantiate_oldstyle_exceptions:
cls = None
elif not issubclass(cls, BaseException):
cls = None
In python 3k ClassType will be pointing to type and issubclass will always return True and if it is combined with instantiate_oldstyle_exceptions set to True will give the unwantd result cls = None
The text was updated successfully, but these errors were encountered:
In the load function of vinegar.py I see the following code:
The second if statement looks suspicious because it will never be true.
Furter below in the same function I see the following code:
In python 3k ClassType will be pointing to type and issubclass will always return True and if it is combined with instantiate_oldstyle_exceptions set to True will give the unwantd result cls = None
The text was updated successfully, but these errors were encountered: