def get(self, request, package, format, *args, **kwargs):
        self.request = request
        self.format = format
        url = package % PYPI_URL
        r_data = redis.get(package)
        if r_data:
            self.package = json2package(r_data)
            return self.handle_package_data()
        try:
            response = requests.get(url)
            response.raise_for_status()
        except requests.exceptions.HTTPError as e:
            self.shield_subject = 'error'
            return self.write_shield('error', 'red')
        else:
            redis.set(package, response.content)
            redis.expire(package, REDIS_EXPIRE)
            self.package = json2package(response.content)
            return self.handle_package_data()
dataset/ETHPy150Open badges/pypipins/shields/shields.py/PypiHandler.get/swapped operands of `%`