Skip to content

Commit

Permalink
Fix PatchApplier init order (sonic-net#1762)
Browse files Browse the repository at this point in the history
#### What I did
Otherwise PatchSorter will see both config_wrapper, patch_wrapper as None.

#### How I did it

#### How to verify it

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
  • Loading branch information
qiluo-msft committed Sep 13, 2021
1 parent 2416175 commit 41e31e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generic_config_updater/generic_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def __init__(self,
changeapplier=None,
config_wrapper=None,
patch_wrapper=None):
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(config_wrapper, patch_wrapper)
self.changeapplier = changeapplier if changeapplier is not None else ChangeApplier()
self.config_wrapper = config_wrapper if config_wrapper is not None else ConfigWrapper()
self.patch_wrapper = patch_wrapper if patch_wrapper is not None else PatchWrapper()
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(self.config_wrapper, self.patch_wrapper)
self.changeapplier = changeapplier if changeapplier is not None else ChangeApplier()

def apply(self, patch):
# validate patch is only updating tables with yang models
Expand Down

0 comments on commit 41e31e8

Please sign in to comment.