From 9b5aa4f943c91377432ddc3a09cad211d557d554 Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Wed, 21 Nov 2018 09:53:30 +0100
Subject: [PATCH] [algorithm][Runner] Use is_autonomous property in checks

---
 beat/backend/python/algorithm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py
index 22b938c..971d957 100644
--- a/beat/backend/python/algorithm.py
+++ b/beat/backend/python/algorithm.py
@@ -204,7 +204,7 @@ class Runner(object):
 
         # The method is optional
         if hasattr(self.obj, 'prepare'):
-            if self.algorithm.type == Algorithm.AUTONOMOUS:
+            if self.algorithm.is_autonomous:
                 self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders.secondaries())
             else:
                 self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders)
@@ -252,7 +252,7 @@ class Runner(object):
                 return loader.run(self.obj, 'process', self.exc, inputs, data_loaders,
                                   outputs_to_use)
 
-            elif self.algorithm.type == Algorithm.AUTONOMOUS:
+            elif self.algorithm.is_autonomous:
                 run_args = [self.obj, 'process', self.exc, data_loaders, outputs_to_use]
 
                 has_loop_arg = utils.has_argument(self.obj.process, 'loop_channel')
-- 
GitLab