From f93983c849d2807f1419c8a04da8d316e89f9cf0 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Wed, 28 Feb 2018 17:45:13 +0100 Subject: [PATCH] [algorithm] Remove use of Prefix New beat.cmdline tests don't need it anymore --- beat/backend/python/algorithm.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py index e2ca8f6..6d6078f 100755 --- a/beat/backend/python/algorithm.py +++ b/beat/backend/python/algorithm.py @@ -857,12 +857,9 @@ class Algorithm(object): if not self.valid: raise RuntimeError("algorithm is not valid") - if isinstance(prefix, six.string_types): - prefix = utils.Prefix(prefix) - - if prefix.paths[0] in self.prefix.paths: - raise RuntimeError("Cannot export algorithm to the same prefix (%s in " \ - "%s)" % (prefix.paths[0], self.prefix.paths)) + if prefix == self.prefix: + raise RuntimeError("Cannot export algorithm to the same prefix (" + "%s)" % prefix) for k in self.libraries.values(): k.export(prefix) -- GitLab