git, hg: added code to handle situations where the project helper object has not been created yet.

Sun, 02 Jun 2019 11:38:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Jun 2019 11:38:28 +0200
changeset 7034
ca42317bb307
parent 7033
39b9e66ddbd6
child 7035
d2036d7f5ef6
child 7037
4560e7a43588

git, hg: added code to handle situations where the project helper object has not been created yet.

eric6/Plugins/VcsPlugins/vcsGit/git.py file | annotate | diff | comparison | revisions
eric6/Plugins/VcsPlugins/vcsMercurial/hg.py file | annotate | diff | comparison | revisions
--- a/eric6/Plugins/VcsPlugins/vcsGit/git.py	Thu May 30 18:36:54 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsGit/git.py	Sun Jun 02 11:38:28 2019 +0200
@@ -109,6 +109,8 @@
         self.__commitDialog = None
         
         self.__patchCheckData = None
+        
+        self.__projectHelper = None
     
     def getPlugin(self):
         """
@@ -158,7 +160,8 @@
             self.submoduleStatusDialog.close()
         
         # shut down the project helpers
-        self.__projectHelper.shutdown()
+        if self.__projectHelper is not None:
+            self.__projectHelper.shutdown()
     
     def initCommand(self, command):
         """
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu May 30 18:36:54 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py	Sun Jun 02 11:38:28 2019 +0200
@@ -131,6 +131,7 @@
             self.__iniWatcher.addPath(cfgFile)
         
         self.__client = None
+        self.__projectHelper = None
         
         self.__repoDir = ""
         self.__repoIniFile = ""
@@ -214,7 +215,8 @@
             os.remove(self.bundleFile)
         
         # shut down the project helpers
-        self.__projectHelper.shutdown()
+        if self.__projectHelper is not None:
+            self.__projectHelper.shutdown()
         
         # shut down the extensions
         for extension in self.__extensions.values():

eric ide

mercurial