Esempio n. 1
0
File: app.py Progetto: 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")
Esempio n. 2
0
 def _validate_operation(self):
     operations = set(self._get_operations())
     if not operations.issubset(set(ImageHandler.OPERATIONS)):
         raise errors.OperationError("Unsupported operation")