From cd6e094f98693db479b0342ed731843570b5a0a0 Mon Sep 17 00:00:00 2001 From: Dudás Ádám Date: Mon, 24 Mar 2014 16:33:12 +0100 Subject: [PATCH] vm: public synchronous call method for operations --- circle/vm/models/operation.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/circle/vm/models/operation.py b/circle/vm/models/operation.py index 4398901..2561b13 100644 --- a/circle/vm/models/operation.py +++ b/circle/vm/models/operation.py @@ -32,10 +32,7 @@ class Operation: self.instance = instance def __call__(self, **kwargs): - """Execute the operation synchronously. - """ - activity = self.__prelude(kwargs) - return self._exec_op(activity=activity, **kwargs) + return self.call(**kwargs) def __unicode__(self): return self.name @@ -73,6 +70,12 @@ class Operation: activity.pk), kwargs=kwargs, queue=self.async_queue) + def call(self, **kwargs): + """Execute the operation synchronously. + """ + activity = self.__prelude(kwargs) + return self._exec_op(activity=activity, **kwargs) + def check_precond(self): pass -- libgit2 0.26.0