diff options
Diffstat (limited to 'src/projManagement')
-rw-r--r-- | src/projManagement/Validation.py | 8 | ||||
-rw-r--r-- | src/projManagement/newProject.py | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py index 18b8a0aa..5f239163 100644 --- a/src/projManagement/Validation.py +++ b/src/projManagement/Validation.py @@ -61,8 +61,8 @@ class Validation: :projDir => Contains path of the new projDir created @return - :"CHECKEXIST" => If same project name folder exists - :"CHECKNAME" => If space is there in project name + :"CHECKEXIST" => If smae project name folder exists + :"CHECKNAME" => If space is there in name :"VALID" => If valid project name given """ print("Function: Validating New Project Information") @@ -72,9 +72,7 @@ class Validation: return "CHECKEXIST" # Project with name already exist else: # Check Proper name for project. It should not have space - # Extract only the project name (basename) from the full path - projName = os.path.basename(projDir) - if re.search(r"\s", projName): + if re.search(r"\s", projDir): return "CHECKNAME" else: return "VALID" diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index 2a443678..10fb0cb5 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -63,8 +63,8 @@ class NewProjectInfo(QtWidgets.QWidget): self.projName = projName self.workspace = self.obj_appconfig.default_workspace['workspace'] # self.projName = self.projEdit.text() - # Remove leading and trailing spaces AND replace internal spaces with underscores - self.projName = str(self.projName).strip().replace(" ", "_") + # Remove leading and trailing space + self.projName = str(self.projName).rstrip().lstrip() self.projDir = os.path.join(self.workspace, str(self.projName)) @@ -144,5 +144,5 @@ class NewProjectInfo(QtWidgets.QWidget): self.msg.exec_() return None, None -def cancelProject(self): - self.close() + def cancelProject(self): + self.close() |