'Returns True if the current exception comes from the client.'

def is_client_exception(self, ex):

    if self.exceptions_module:
        if isinstance(self.exceptions_module, list):
            for m in self.exceptions_module:
                if (type(ex) in six.itervalues(m.__dict__)):
                    return True
        else:
            return (type(ex) in six.itervalues(self.exceptions_module.__dict__))
    return False
