Commits

Steve Borho committed 8665faa

bugtraq: catch more COM exceptions (refs #1757)

  • Participants
  • Parent commits 3ee430a
  • Branches hgtk

Comments (0)

Files changed (1)

File tortoisehg/hgtk/bugtraq.py

     def _get_bugtraq_object(self):
         if self.bugtr == None:
             obj = CreateObject(self.guid)
-            self.bugtr = obj.QueryInterface(IBugTraqProvider2)
+            try:
+                self.bugtr = obj.QueryInterface(IBugTraqProvider2)
+            except COMError:
+                return None
         return self.bugtr
 
     def get_commit_message(self, parameters, logmessage):
         try:
             bugtr.HasOptions()
             return True
-        except ValueError:
+        except (ValueError, AttributeError):
             return False