fork download
  1. _watcher_order = get_order(1500)
  2.  
  3. class WatcherMixin(SynchronizedDeletion, base.ResourceManager):
  4.  
  5. def id(self):
  6. return self.raw_resource.uuid
  7.  
  8. def list(self):
  9. return self._manager().list(limit=0)
  10.  
  11. @base.resource("watcher", "audit_template", order=next(_watcher_order),
  12. admin_required=True, perform_for_admin_only=True)
  13. class WatcherTemplate(WatcherMixin):
  14.  
  15. def is_deleted(self):
  16. from watcherclient.common.apiclient import exceptions
  17. try:
  18. self._manager().get(self.id())
  19. return False
  20. except exceptions.NotFound:
  21. return True
  22.  
  23.  
  24. @base.resource("watcher", "action", order=next(_watcher_order),
  25. admin_required=True, perform_for_admin_only=True)
  26. class WatcherAudit(WatcherMixin):
  27. pass
  28.  
  29. @base.resource("watcher", "action_plan", order=next(_watcher_order),
  30. admin_required=True, perform_for_admin_only=True)
  31. class WatcherAudit(WatcherMixin):
  32. pass
  33.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError: Sorry: IndentationError: expected an indented block (prog.py, line 6)
stdout
Standard output is empty