예제 #1
0
파일: app.py 프로젝트: khoama/pilbox
 def _validate_operation(self):
     operations = set(self._get_operations())
     if not operations.issubset(self.settings.get("allowed_operations")):
         raise errors.OperationError("Unsupported operation")
     elif len(operations) > self.settings.get("max_operations"):
         raise errors.OperationError("Too many operations")
예제 #2
0
 def _validate_operation(self):
     operations = set(self._get_operations())
     if not operations.issubset(set(ImageHandler.OPERATIONS)):
         raise errors.OperationError("Unsupported operation")