summaryrefslogtreecommitdiff
path: root/src/projManagement
diff options
context:
space:
mode:
Diffstat (limited to 'src/projManagement')
-rw-r--r--src/projManagement/Worker.py7
-rw-r--r--src/projManagement/newProject.py3
-rw-r--r--src/projManagement/openProject.py9
3 files changed, 13 insertions, 6 deletions
diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py
index cdad4170..970bfccd 100644
--- a/src/projManagement/Worker.py
+++ b/src/projManagement/Worker.py
@@ -13,13 +13,12 @@
# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
-# REVISION: Sunday 02 August 2020
+# REVISION: Sunday 16 August 2020
# =========================================================================
from PyQt5 import QtCore
import subprocess
from configuration.Appconfig import Appconfig
-import threading
class WorkerThread(QtCore.QThread):
@@ -53,8 +52,10 @@ class WorkerThread(QtCore.QThread):
@return
None
"""
- if threading.active_count() > 1:
+ try:
self.wait()
+ except BaseException:
+ pass
def get_proc_threads(self):
"""
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py
index ad29dc76..278cfbe3 100644
--- a/src/projManagement/newProject.py
+++ b/src/projManagement/newProject.py
@@ -124,6 +124,7 @@ class NewProjectInfo(QtWidgets.QWidget):
' existing project'
)
self.msg.exec_()
+ return None, None
elif self.reply == "CHECKNAME":
self.msg = QtWidgets.QErrorMessage(self)
@@ -132,6 +133,7 @@ class NewProjectInfo(QtWidgets.QWidget):
self.msg.showMessage(
'The project name should not contain space between them')
self.msg.exec_()
+ return None, None
elif self.reply == "NONE":
self.msg = QtWidgets.QErrorMessage(self)
@@ -139,6 +141,7 @@ class NewProjectInfo(QtWidgets.QWidget):
self.msg.setWindowTitle("Error Message")
self.msg.showMessage('The project name cannot be empty')
self.msg.exec_()
+ return None, None
def cancelProject(self):
self.close()
diff --git a/src/projManagement/openProject.py b/src/projManagement/openProject.py
index 04944d29..c5bc2dec 100644
--- a/src/projManagement/openProject.py
+++ b/src/projManagement/openProject.py
@@ -16,7 +16,7 @@
# REVISION: Sunday 26 July 2020
# =========================================================================
-from PyQt5 import QtWidgets
+from PyQt5 import QtWidgets, QtCore
from .Validation import Validation
from configuration.Appconfig import Appconfig
import os
@@ -45,8 +45,11 @@ class OpenProjectInfo(QtWidgets.QWidget):
"""
self.obj_Appconfig = Appconfig()
self.openDir = self.obj_Appconfig.default_workspace["workspace"]
- self.projDir = QtWidgets.QFileDialog.getExistingDirectory(
- self, "open", self.openDir)
+ self.projDir = QtCore.QDir.toNativeSeparators(
+ QtWidgets.QFileDialog.getExistingDirectory(
+ self, "open", self.openDir
+ )
+ )
if self.obj_validation.validateOpenproj(self.projDir):
self.obj_Appconfig.current_project['ProjectName'] = str(