diff options
author | fahim | 2015-02-25 12:28:36 +0530 |
---|---|---|
committer | fahim | 2015-02-25 12:28:36 +0530 |
commit | b8a87cdb785471005e96234782287528e3edc39c (patch) | |
tree | a4fb514bd17255b67514c3546ced9dce9e769197 /src/projManagement/Validation.py | |
parent | 22254c4024c72f71de4d4fc0b71bbb22fac8a747 (diff) | |
download | eSim-b8a87cdb785471005e96234782287528e3edc39c.tar.gz eSim-b8a87cdb785471005e96234782287528e3edc39c.tar.bz2 eSim-b8a87cdb785471005e96234782287528e3edc39c.zip |
Subject: Kicad Module modified along with some other minor changes
Description: Added openschematic,openlayout,openpcb in the kicad module.
Diffstat (limited to 'src/projManagement/Validation.py')
-rw-r--r-- | src/projManagement/Validation.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py index 864ac448..a9da3101 100644 --- a/src/projManagement/Validation.py +++ b/src/projManagement/Validation.py @@ -24,10 +24,10 @@ class Validation: def __init__(self): pass - def validateOpenproj(self,proj_directory): + def validateOpenproj(self,projDir): print "Validate openProj called" - projName = os.path.basename(str(proj_directory)) - lookProj = os.path.join(str(proj_directory),projName+".proj") + projName = os.path.basename(str(projDir)) + lookProj = os.path.join(str(projDir),projName+".proj") #Check existence of project if os.path.exists(lookProj): return True @@ -37,21 +37,28 @@ class Validation: - def validateNewproj(self,project_dir): + def validateNewproj(self,projDir): print "Validate newProj called" - print "Project Directory : ",project_dir + print "Project Directory : ",projDir #Checking existence of project with same name - if os.path.exists(project_dir): + if os.path.exists(projDir): return "CHECKEXIST" #Project with name already exist else: #Check Proper name for project. It should not have space - if re.search(r"\s",project_dir ): + if re.search(r"\s",projDir ): return "CHECKNAME" else: return "VALID" + + def validateKicad(self,projDir): + print "Validation for Kicad components" + if projDir == None: + return False + else: + return True |