Skip to content
Snippets Groups Projects
Commit a6a499b4 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[dataformat] Remove use of Prefix

parent 6101a2d6
Branches
Tags
1 merge request!17Merge development branch 1.5.x
......@@ -48,8 +48,7 @@ class Storage(utils.Storage):
Parameters:
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
your installation.
prefix (str): Establishes the prefix of your installation.
name (str): The name of the dataformat object in the format
``<user>/<name>/<version>``.
......@@ -63,11 +62,7 @@ class Storage(utils.Storage):
self.username, self.name, self.version = name.split('/')
self.fullname = name
if isinstance(prefix, utils.Prefix):
self.prefix = prefix
else:
self.prefix = utils.Prefix(prefix)
self.prefix = prefix
path = utils.hashed_or_simple(self.prefix, 'dataformats', name, suffix='.json')
path = path[:-5]
......@@ -87,7 +82,7 @@ class DataFormat(object):
Parameters:
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
prefix (str): Establishes the prefix of
your installation.
data (str, dict): The fully qualified algorithm name (e.g. ``user/algo/1``)
......@@ -492,8 +487,7 @@ class DataFormat(object):
Parameters:
prefix (beat.backend.python.utils.Prefix): Establishes the prefix of
your installation.
prefix (str): Establishes the prefix of your installation.
Returns:
......@@ -513,9 +507,6 @@ class DataFormat(object):
if not self.valid:
raise RuntimeError("dataformat is not valid")
if isinstance(prefix, six.string_types):
prefix = utils.Prefix(prefix)
if prefix == self.prefix:
raise RuntimeError("Cannot export dataformat to the same prefix ("
"%s)" % prefix)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment