diff options
author | anjalijaiswal08 | 2019-06-27 15:24:59 +0530 |
---|---|---|
committer | anjalijaiswal08 | 2019-06-27 15:24:59 +0530 |
commit | 0a3a2c452319c48e0f6b4d694688d55106f31f1e (patch) | |
tree | a571ed03409b86c7e360af47f6bb6f8abbf2611d | |
parent | 360f41473a7d64e74ff071086f70176911c878ea (diff) | |
download | eSim-0a3a2c452319c48e0f6b4d694688d55106f31f1e.tar.gz eSim-0a3a2c452319c48e0f6b4d694688d55106f31f1e.tar.bz2 eSim-0a3a2c452319c48e0f6b4d694688d55106f31f1e.zip |
Removed extra print statements
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 41 |
1 files changed, 15 insertions, 26 deletions
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] = \ |