dabo Commit
Revision 4185
Date: 2008-06-26 06:05:12 -0700 (Thu, 26 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4185
Changed:
U trunk/dabo/db/dConnectInfo.py
U trunk/dabo/ui/dialogs/PreferenceDialog.py
U trunk/dabo/ui/dialogs/SortingForm.py
U trunk/dabo/ui/dialogs/Wizard.py
Log:
Removed bare 'except:' lines.
Diff:
Modified: trunk/dabo/db/dConnectInfo.py
===================================================================
--- trunk/dabo/db/dConnectInfo.py 2008-06-26 01:09:33 UTC (rev 4184)
+++ trunk/dabo/db/dConnectInfo.py 2008-06-26 13:05:12 UTC (rev 4185)
@@ -77,7 +77,7 @@
# name, use that connection; otherwise, use the first.
try:
connDict = cd[nm]
- except:
+ except KeyError:
nm = cd.keys()[0]
connDict = cd[nm]
Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py 2008-06-26 01:09:33 UTC (rev
4184)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py 2008-06-26 13:05:12 UTC (rev
4185)
@@ -121,7 +121,7 @@
try:
mb = af.MenuBar
menuOK = True
- except:
+ except AttributeError:
menuOK = False
mb = None
if menuOK:
@@ -171,7 +171,7 @@
try:
cap = cleanMenuCaption(itm.Caption, "&")
prefcap = cleanMenuCaption(itm.Caption)
- except:
+ except AttributeError:
# A separator line
continue
kidnode = nd.appendChild(cap)
Modified: trunk/dabo/ui/dialogs/SortingForm.py
===================================================================
--- trunk/dabo/ui/dialogs/SortingForm.py 2008-06-26 01:09:33 UTC (rev
4184)
+++ trunk/dabo/ui/dialogs/SortingForm.py 2008-06-26 13:05:12 UTC (rev
4185)
@@ -26,7 +26,7 @@
def _getChoices(self):
try:
return self.listBox.Choices
- except:
+ except AttributeError:
return self._itms
def _setChoices(self, chc):
@@ -39,7 +39,7 @@
def _setListCaption(self, val):
try:
self.listBox.Caption = val
- except:
+ except AttributeError:
self._listCaption = val
Modified: trunk/dabo/ui/dialogs/Wizard.py
===================================================================
--- trunk/dabo/ui/dialogs/Wizard.py 2008-06-26 01:09:33 UTC (rev 4184)
+++ trunk/dabo/ui/dialogs/Wizard.py 2008-06-26 13:05:12 UTC (rev 4185)
@@ -207,7 +207,7 @@
"""Returns the first page that is an instance of the passed
class"""
try:
ret = [pg for pg in self._pages if isinstance(pg,
pgClass)][0]
- except:
+ except IndexError:
ret = None
return ret
@@ -216,15 +216,11 @@
if self.PageCount == 0:
return
if self._blankPage:
- try:
- self.pagePanel.Sizer.remove(self._blankPage)
- except: pass
+ self.pagePanel.Sizer.remove(self._blankPage)
self._blankPage.release()
for idx in range(self.PageCount):
page = self._pages[idx]
- try:
- self.pagePanel.Sizer.remove(page)
- except: pass
+ self.pagePanel.Sizer.remove(page)
if idx == self._currentPage:
page.Visible = True
# Need this to keep the pages resizing
correctly.
@@ -266,7 +262,7 @@
try:
idx = self._pages.index(orig)
ret = self._pages[idx + incr]
- except:
+ except IndexError:
ret = None
return ret
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]