Skip to content

Commit

Permalink
config-mgmt: T5353: after updated save-config, one can include init rev
Browse files Browse the repository at this point in the history
The legacy config-mgmt/save-config tools had an abiding bug that would
raise an error if comparing/reading the init archive; this is no longer
an issue.

(cherry picked from commit 52e4b44)
  • Loading branch information
jestabro committed Sep 7, 2023
1 parent e3bd64f commit 1ce3dba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/vyos/config_mgmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,8 @@ def _get_number_of_revisions(self) -> int:
return len(l)

def _check_revision_number(self, rev: int) -> bool:
# exclude init revision:
maxrev = self._get_number_of_revisions()
if not 0 <= rev < maxrev - 1:
if not 0 <= rev < maxrev:
return False
return True

Expand Down

0 comments on commit 1ce3dba

Please sign in to comment.