Fixed error reporting for legacy project folder converter

This commit is contained in:
Veronica K. B. Olsen
2020-07-02 20:56:50 +02:00
parent eb985280ed
commit 7bdfbc4ce7
+2 -3
View File
@@ -269,7 +269,7 @@ class NWProject():
for projItem in listdir(self.projPath): for projItem in listdir(self.projPath):
logger.verbose("Project contains: %s" % projItem) logger.verbose("Project contains: %s" % projItem)
if projItem.startswith("data_"): if projItem.startswith("data_"):
self._legacyDataFolder(projItem) errList = self._legacyDataFolder(projItem, errList)
if errList: if errList:
self.makeAlert(errList, nwAlert.ERROR) self.makeAlert(errList, nwAlert.ERROR)
@@ -1165,10 +1165,9 @@ class NWProject():
# Legacy Data Structure Handlers # Legacy Data Structure Handlers
## ##
def _legacyDataFolder(self, theFolder): def _legacyDataFolder(self, theFolder, errList):
"""Clean up legacy data folders. """Clean up legacy data folders.
""" """
errList = []
theData = path.join(self.projPath, theFolder) theData = path.join(self.projPath, theFolder)
if not path.isdir(theData): if not path.isdir(theData):
errList.append("Not a folder: %s" % theData) errList.append("Not a folder: %s" % theData)