Commits

Steve Borho  committed 46c7958

thgconfig: safely handle non-Windows bugtraq support

  • Participants
  • Parent commits 219524e
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgtk/thgconfig.py

 from tortoisehg.hgtk import dialog, gdialog, gtklib, hgcmd, bugtraq
 
 try:
+    from tortoisehg.hgtk import bugtraq
+    bugtraq.get_issue_plugins_with_names()
+except ImportError:
+    bugtraq = None
+
+try:
     from iniparse.config import Undefined
 except ImportError:
     class Undefined(object):
 
         # add page items to treeview
         for meta, info in INFO:
+            if meta['name'] == 'issue' and bugtraq is None:
+                continue
             pixbuf = gtklib.get_icon_pixbuf(meta['icon'],
                             gtk.ICON_SIZE_LARGE_TOOLBAR)
             self.confmodel.append((pixbuf, meta['label'], meta['name']))