Skip to content

Commit

Permalink
Merge pull request #2920 from Alex-developer/v2023.05.01_03
Browse files Browse the repository at this point in the history
Fix for flow upgrade not handling empty files
  • Loading branch information
Alex-developer authored Aug 16, 2023
2 parents 7204b94 + 374e572 commit bf566a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/flowupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ def _processFile(self, file):
currentFilePath = os.path.join(self._configPath, "modules", file)

oldJson = self._loadJsonFile(oldFilePath)
currentJson = self._loadJsonFile(currentFilePath)
if oldJson is not None:
currentJson = self._loadJsonFile(currentFilePath)

currentJson = self._copyModules(oldJson, currentJson)
currentJson = self._updateParams(oldJson, currentJson)
currentJson = self._copyModules(oldJson, currentJson)
currentJson = self._updateParams(oldJson, currentJson)

self._saveJsonFile(currentFilePath, currentJson)
self._saveJsonFile(currentFilePath, currentJson)

def _mergeModuleSettings(self, file):
oldFilePath = os.path.join(self._priorPath, "modules", file)
Expand Down

0 comments on commit bf566a5

Please sign in to comment.