summaryrefslogtreecommitdiff
path: root/src/projManagement/Kicad.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/projManagement/Kicad.py')
-rw-r--r--src/projManagement/Kicad.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py
index 16569d80..833f075e 100644
--- a/src/projManagement/Kicad.py
+++ b/src/projManagement/Kicad.py
@@ -10,10 +10,10 @@
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
-# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
+# MODIFIED: Rahul Paknikar, Partha Singh Roy
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 17 February 2015
-# REVISION: Sunday 26 July 2020
+# REVISION: Thursday 29 Jun 2023
# =========================================================================
import os
@@ -25,7 +25,7 @@ from PyQt5 import QtWidgets
class Kicad:
"""
- This class called the Kicad Schematic,KicadtoNgspice Converter,Layout
+ This class called the Kicad Schematic, KicadtoNgspice Converter, Layout
editor and Footprint Editor
Initialise validation, appconfig and dockarea
@@ -79,19 +79,17 @@ class Kicad:
'Kicad Schematic is called for project ' + self.projDir)
except BaseException:
pass
- # Validating if current project is available or not
+ # Validating if current project is available or not
if self.obj_validation.validateKicad(self.projDir):
self.projName = os.path.basename(self.projDir)
self.project = os.path.join(self.projDir, self.projName)
- # Creating a command to run
- if os.path.exists(self.project + ".kicad_sch"):
- self.cmd = "eeschema " + self.project + ".kicad_sch" #kicad v6 file
- elif os.path.exists(self.project + ".sch"):
- self.cmd = "eeschema " + self.project + ".sch" #kicad v4 file
- else:
- self.cmd = "eeschema " + self.project + ".kicad_sch"
+ # creating a command to open schematic
+ self.cmd = "eeschema " + self.project + ".kicad_sch" # kicad6 file
+ if not os.path.exists(self.project + ".kicad_sch") \
+ and os.path.exists(self.project + ".sch"):
+ self.cmd = "eeschema " + self.project + ".sch" # kicad4 file
self.obj_workThread.args = self.cmd
self.obj_workThread.start()