def if_folder_writable(self):
        try:
            permissions = self.service.permissions().list(fileId=self.folder_id).execute()
            valid_roles = ["writer", "owner"]
            logger.debug(pprint.pformat(permissions))
            for p in permissions["items"]:
                email = p.get("emailAddress", None).lower()
                role = p.get("role", None).lower()

                logger.debug((email, role) % "email: %s, role: %s")

                if(email == self.auth_user) and (role in valid_roles):
                    return True
        except:
            return False

        return False
dataset/ETHPy150Open tienfuc/gdcmdtools/gdcmdtools/put.py/GDPut.if_folder_writable/swapped operands of `%`