From 732303ed4eb8a0a5924eb1ca9bdbb53da2649598 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Mon, 6 Apr 2009 20:37:52 +0000 Subject: [PATCH] Normalize space/tabs indentation for Python 3.0 git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1339 3ecf2c5c-341e-0410-92b4-d18e462d057c --- plugins/pyloader/src/ScriptAdapter.py | 52 +++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/plugins/pyloader/src/ScriptAdapter.py b/plugins/pyloader/src/ScriptAdapter.py index 8bc6791..ffb7546 100644 --- a/plugins/pyloader/src/ScriptAdapter.py +++ b/plugins/pyloader/src/ScriptAdapter.py @@ -56,14 +56,14 @@ class ScriptAdapter : # @param policy A user-implemented class inheriting from Policy.Policy def __init__(self, policy): self._policy = policy() - print 'ScriptAdapter for policy ', policy, ' loaded' + print ('ScriptAdapter for policy ', policy, ' loaded') ## @brief Asynchronously call Policy.configure() # # @param self The caller object def async_configure(self): self._g_last_exception = None - self._g_mutex.lock(ScriptAdapter._wrap_configure, self ) + self._g_mutex.lock(ScriptAdapter._wrap_configure, self ) def _wrap_configure(self): thread.start_new_thread(ScriptAdapter._wrap_configure_callback, (self,)) @@ -71,10 +71,10 @@ class ScriptAdapter : def _wrap_configure_callback(self): # call configure method try: - self._policy.configure() - except: - self._g_last_exception = sys.exc_value - self._g_mutex.unlock() + self._policy.configure() + except: + self._g_last_exception = sys.exc_value + self._g_mutex.unlock() ## @brief Asynchronously call Policy.sort_queue() @@ -94,13 +94,13 @@ class ScriptAdapter : # here we retrieve and pass the ready queue queue = sgpem.Scheduler.get_instance().get_ready_queue() - try: - self._policy.sort_queue(queue) - except: - # exception raised in user-defined method, - # save it so the C++ code can tell the - # user what went wrong - self._g_last_exception = sys.exc_value + try: + self._policy.sort_queue(queue) + except: + # exception raised in user-defined method, + # save it so the C++ code can tell the + # user what went wrong + self._g_last_exception = sys.exc_value self._g_mutex.unlock() @@ -116,12 +116,12 @@ class ScriptAdapter : def _wrap_is_preemptive_callback(self): try: - self._ret_val = self._policy.is_preemptive() - except: - # exception raised in user-defined method, - # save it so the C++ code can tell the - # user what went wrong - self._g_last_exception = sys.exc_value + self._ret_val = self._policy.is_preemptive() + except: + # exception raised in user-defined method, + # save it so the C++ code can tell the + # user what went wrong + self._g_last_exception = sys.exc_value self._g_mutex.unlock() ## @brief Asynchronously call Policy.get_time_slice() @@ -136,12 +136,12 @@ class ScriptAdapter : def _wrap_get_time_slice_callback(self): try: - self._ret_val = self._policy.get_time_slice() - except: - # exception raised in user-defined method, - # save it so the C++ code can tell the - # user what went wrong - self._g_last_exception = sys.exc_value + self._ret_val = self._policy.get_time_slice() + except: + # exception raised in user-defined method, + # save it so the C++ code can tell the + # user what went wrong + self._g_last_exception = sys.exc_value self._g_mutex.unlock() ## @brief Return the global shared variable with the methods' last return value @@ -152,5 +152,5 @@ class ScriptAdapter : return self._g_mutex.test() def get_last_exception(self): - return self._g_last_exception + return self._g_last_exception