Skip to content

Commit 41e31e8

Browse files
authored
Fix PatchApplier init order (#1762)
#### 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)
1 parent 2416175 commit 41e31e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generic_config_updater/generic_updater.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def __init__(self,
3232
changeapplier=None,
3333
config_wrapper=None,
3434
patch_wrapper=None):
35-
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(config_wrapper, patch_wrapper)
36-
self.changeapplier = changeapplier if changeapplier is not None else ChangeApplier()
3735
self.config_wrapper = config_wrapper if config_wrapper is not None else ConfigWrapper()
3836
self.patch_wrapper = patch_wrapper if patch_wrapper is not None else PatchWrapper()
37+
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(self.config_wrapper, self.patch_wrapper)
38+
self.changeapplier = changeapplier if changeapplier is not None else ChangeApplier()
3939

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

0 commit comments

Comments
 (0)