Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def proto_error(err):
"""
If err is a ProtoError, I just return it. Otherwise I create a ProtoError
out of err and return it.
"""
if isinstance(err, ProtoError):
return err
else:
return ProtoError(err)
def proto_error(err):
"""
If err is a ProtoError, I just return it. Otherwise I create a ProtoError
out of err and return it.
"""
if isinstance(err, ProtoError):
return err
else:
return ProtoError(err)