diff --git a/src/diffpy/pdfgui/gui/aboutdialog.py b/src/diffpy/pdfgui/gui/aboutdialog.py index c71c45b3..7550da67 100644 --- a/src/diffpy/pdfgui/gui/aboutdialog.py +++ b/src/diffpy/pdfgui/gui/aboutdialog.py @@ -3,8 +3,8 @@ # # PDFgui by DANSE Diffraction group # Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# (c) 2024 trustees of the Columbia University in the City +# (c) 2006 Trustees of the Michigan State University. +# (c) 2024 Trustees of the Columbia University in the City # of New York # All rights reserved. # diff --git a/src/diffpy/pdfgui/gui/errorwrapper.py b/src/diffpy/pdfgui/gui/errorwrapper.py index a45a55fc..de99d93b 100644 --- a/src/diffpy/pdfgui/gui/errorwrapper.py +++ b/src/diffpy/pdfgui/gui/errorwrapper.py @@ -75,7 +75,7 @@ def _f(*args, **kwargs): return rvpass # Everything else - except: + except Exception: if pdfguiglobals.dbopts.pythondebugger: import pdb diff --git a/src/diffpy/pdfgui/gui/fittree.py b/src/diffpy/pdfgui/gui/fittree.py index 886a6e61..250656e3 100644 --- a/src/diffpy/pdfgui/gui/fittree.py +++ b/src/diffpy/pdfgui/gui/fittree.py @@ -356,7 +356,7 @@ def AddFit(self, fitname="Fit 1", cdata=None, paste=False): cdata = self.control.paste(cdata, None, fitname, pos) self.SetControlData(newfit, cdata) return newfit - except: + except Exception: self.Delete(newfit) raise return @@ -427,7 +427,7 @@ def AddPhase(self, node, label, insertafter=None, filename=None, makedata=True, elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newphase - except: + except Exception: self.Delete(newphase) raise return @@ -492,7 +492,7 @@ def AddDataSet(self, node, label, insertafter=None, filename=None, makedata=True elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newset - except: + except Exception: self.Delete(newset) raise return @@ -553,7 +553,7 @@ def AddCalc(self, node, label, insertafter=None, makedata=True, cdata=None): elif cdata is not None: self.control.paste(cdata, pdata, label, pos) return newcalc - except: + except Exception: self.Delete(newcalc) raise return @@ -611,7 +611,7 @@ def GetClipboard(self): if cdatabytes[:16] == "pdfgui_cliboard=".encode(): cdatabytes = cdatabytes[16:] cdata = pickle_loads(cdatabytes) - except: + except Exception: pass return cdata diff --git a/src/diffpy/pdfgui/gui/phaseconfigurepanel.py b/src/diffpy/pdfgui/gui/phaseconfigurepanel.py index 48bdaadd..5f294162 100644 --- a/src/diffpy/pdfgui/gui/phaseconfigurepanel.py +++ b/src/diffpy/pdfgui/gui/phaseconfigurepanel.py @@ -393,7 +393,7 @@ def applyTextCtrlChange(self, id, value): return value - except: + except Exception: return None def applyCellChange(self, i, j, value): diff --git a/src/diffpy/pdfgui/gui/phasepanelutils.py b/src/diffpy/pdfgui/gui/phasepanelutils.py index 6b4d03af..8459294e 100644 --- a/src/diffpy/pdfgui/gui/phasepanelutils.py +++ b/src/diffpy/pdfgui/gui/phasepanelutils.py @@ -234,7 +234,7 @@ def canPasteIntoCells(panel): # Strip any trailing tabs rowlist = [r.rstrip("\t") for r in rowlist] celllist = [r.split("\t") for r in rowlist] - except: + except wx.PyDeadObjectError: return False if len(celllist) == 0: diff --git a/src/diffpy/pdfgui/gui/plotpanel.py b/src/diffpy/pdfgui/gui/plotpanel.py index 241f4b48..8aaaec39 100644 --- a/src/diffpy/pdfgui/gui/plotpanel.py +++ b/src/diffpy/pdfgui/gui/plotpanel.py @@ -16,7 +16,6 @@ # generated by wxGlade 0.9.3 on Fri Jul 19 16:05:24 2019 -import sys import wx @@ -167,7 +166,7 @@ def _represent(mixedNames): xvals = _represent(xdata) try: xvals.remove("rw") - except: + except ValueError: pass numericStringSort(xvals)