From ec8b5d8e57b4ba0bec434e87bd722861664e7bbb Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Wed, 28 Feb 2018 17:44:54 +0100 Subject: [PATCH] [database] Remove use of Prefix New beat.cmdline tests don't need it anymore --- beat/backend/python/database.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/beat/backend/python/database.py b/beat/backend/python/database.py index 3cd1aa1..c1fdac4 100755 --- a/beat/backend/python/database.py +++ b/beat/backend/python/database.py @@ -502,12 +502,9 @@ class Database(object): if not self.valid: raise RuntimeError("database 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 database to the same prefix (%s in " \ - "%s)" % (prefix.paths[0], self.prefix.paths)) + if prefix == self.prefix: + raise RuntimeError("Cannot export database to the same prefix (" + "%s)" % prefix) for k in self.dataformats.values(): k.export(prefix) -- GitLab