diff --git a/beat/backend/python/algorithm.py b/beat/backend/python/algorithm.py index e2ca8f6ce0c208bbe7726048c80e0b61cf8b9b69..6d6078f64d623a884fa710f5caa713a7eb6b1137 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)