@classmethod
def wrap(cls, orig_err):
    attr_check = functools.partial(hasattr, orig_err)
    is_old = (not all(map(attr_check, ['funcname', 'winerror'])))
    return (cls(orig_err) if is_old else orig_err)
@classmethod
def wrap(cls, orig_err):
    attr_check = functools.partial(hasattr, orig_err)
    is_old = (not all(map(attr_check, ['funcname', 'winerror'])))
    return (cls(orig_err) if is_old else orig_err)