def _obtain_setting(self, k1, k2, required=True):
        name = "OAUTH_ACCESS_SETTINGS"
        service = self.service
        try:
            return getattr(settings, name)[service][k1][k2]
        except AttributeError:
            raise ImproperlyConfigured("%s must be defined in settings" % (name,))
        except KeyError, e:
            key = e.args[0]
            if key == service:
                raise ImproperlyConfigured((name, service) % "%s must contain '%s'")
            # check this here, because the service key should exist regardless
            if not required:
                return None
            elif key == k1:
                raise ImproperlyConfigured("%s must contain '%s' for '%s'" % (name, k1, service))
            elif key == k2:
                raise ImproperlyConfigured("%s must contain '%s' for '%s' in '%s'" % (name, k2, k1, service))
            else:
                raise
dataset/ETHPy150Open eldarion/django-oauth-access/oauth_access/access.py/OAuthAccess._obtain_setting/swapped operands of `%`