From b8a87cdb785471005e96234782287528e3edc39c Mon Sep 17 00:00:00 2001 From: fahim Date: Wed, 25 Feb 2015 12:28:36 +0530 Subject: Subject: Kicad Module modified along with some other minor changes Description: Added openschematic,openlayout,openpcb in the kicad module. --- src/projManagement/Validation.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/projManagement/Validation.py') 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 -- cgit