Made the 'git blame' dialog a little bit more resilient. eric7

Thu, 14 Jul 2022 10:21:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 14 Jul 2022 10:21:36 +0200
branch
eric7
changeset 9230
70f269d529e4
parent 9229
326810448a9c
child 9231
d92a18dffa5e

Made the 'git blame' dialog a little bit more resilient.

src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py file | annotate | diff | comparison | revisions
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py	Thu Jul 14 10:18:45 2022 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py	Thu Jul 14 10:21:36 2022 +0200
@@ -212,8 +212,9 @@
                 self.process.readLine(), Preferences.getSystem("IOEncoding"), "replace"
             ).strip()
             match = self.__blameRe.match(line)
-            commitId, author, date, time, lineno, text = match.groups()
-            self.__generateItem(commitId, author, date, time, lineno, text)
+            if match is not None:
+                commitId, author, date, time, lineno, text = match.groups()
+                self.__generateItem(commitId, author, date, time, lineno, text)
 
     def __readStderr(self):
         """

eric ide

mercurial