Commits

Yuya Nishihara  committed f28352a

customtools: don't suppress unknown exceptions

It should catch bad user input only.

  • Participants
  • Parent commits fcc018e

Comments (0)

Files changed (1)

File tortoisehg/hgqt/customtools.py

         if selecteditem:
             try:
                 index = items.index(selecteditem)
-            except:
+            except ValueError:
                 if defaultitem:
-                    try:
-                        index = items.index(defaultitem)
-                    except:
-                        pass
+                    index = items.index(defaultitem)
         combo = QComboBox()
         combo.addItems(items)
         if index: