Skip to content

Commit

Permalink
schema: Do not assert data is valid when upgrading
Browse files Browse the repository at this point in the history
Do not assert the data supplied to
kcidb_io.schema.misc.Version.upgrade() is valid, as that prevents a more
readable error message when trying to upgrade newer schema version to
older schema version. The function validates the data at the end anyway.
  • Loading branch information
spbnick committed Nov 17, 2021
1 parent 30d145e commit be5a8ba
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kcidb_io/schema/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ def upgrade(self, data, copy=True):
or any of the previous
schema versions.
"""
assert LIGHT_ASSERTS or self.is_valid(data)
if copy:
data = deepcopy(data)
if not self.is_compatible_exactly(data):
Expand Down

0 comments on commit be5a8ba

Please sign in to comment.