From 0a3a2c452319c48e0f6b4d694688d55106f31f1e Mon Sep 17 00:00:00 2001 From: anjalijaiswal08 Date: Thu, 27 Jun 2019 15:24:59 +0530 Subject: Removed extra print statements --- src/frontEnd/ProjectExplorer.py | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) (limited to 'src/frontEnd/ProjectExplorer.py') diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 7a25fef3..4d09c4ed 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -244,18 +244,13 @@ class ProjectExplorer(QtGui.QWidget): self.baseFileName ) if ok and newBaseFileName: - print("=================") print(newBaseFileName) print("=================") newBaseFileName = str(newBaseFileName) - i = -1 - print(self.indexItem.row()) - print("=================") + i = -1 for parents, children in list( self.obj_appconfig.project_explorer.items()): - print(parents) - print("-------------------") if os.path.exists(parents): i += 1 if i == self.indexItem.row(): @@ -284,28 +279,8 @@ class ProjectExplorer(QtGui.QWidget): else: reply = self.obj_validation.validateNewproj(str(projDir)) - print("==================") - # rename files matching project name if reply == "VALID": - for projectFile in projectFiles: - if self.baseFileName in projectFile: - oldFilePath = os.path.join(projectPath, - projectFile) - projectFile = projectFile.replace( - self.baseFileName, newBaseFileName, 1) - newFilePath = os.path.join( - projectPath, projectFile) - print(oldFilePath) - print("==================") - print(newFilePath) - print("==================") - print ("Renaming " - + oldFilePath - + " to " - + newFilePath) - updatedProjectFiles.append(projectFile) - # rename project folder updatedProjectPath = newBaseFileName.join( projectPath.rsplit(self.baseFileName, 1)) @@ -315,6 +290,20 @@ class ProjectExplorer(QtGui.QWidget): + updatedProjectPath) os.rename(projectPath, updatedProjectPath) + # rename files matching project name + for projectFile in projectFiles: + if self.baseFileName in projectFile: + oldFilePath = os.path.join(updatedProjectPath, + projectFile) + projectFile = projectFile.replace( + self.baseFileName, newBaseFileName, 1) + newFilePath = os.path.join( + updatedProjectPath, projectFile) + print("Renaming " + oldFilePath + " to" + + newFilePath) + os.rename(oldFilePath, newFilePath) + updatedProjectFiles.append(projectFile) + # update project_explorer dictionary del self.obj_appconfig.project_explorer[projectPath] self.obj_appconfig.project_explorer[updatedProjectPath] = \ -- cgit