From: devicerandom Date: Thu, 19 Feb 2009 11:30:57 +0000 (+0000) Subject: (pcluster.py) fixed crash when file not recognized X-Git-Tag: 0.9.0~56 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=206dd7517cfe81a82f2fa0da02f83677c776f080;p=hooke.git (pcluster.py) fixed crash when file not recognized --- diff --git a/pcluster.py b/pcluster.py index a70a7b7..08222c6 100644 --- a/pcluster.py +++ b/pcluster.py @@ -143,7 +143,13 @@ class pclusterCommands: c+=1 item.identify(self.drivers) itplot=item.curve.default_plots() - peak_location,peak_size=self.exec_has_peaks(item,min_deviation) + try: + peak_location,peak_size=self.exec_has_peaks(item,min_deviation) + except: + #We have troubles with exec_has_peaks (bad curve, whatever). + #Print info and go to next cycle. + print 'Cannot process ',item.path + continue fit_points, contact_point, pl_value, T, cindex, avg = plot_informations(itplot) print '\n\nCurve',item.path, 'is',c,'of',len(self.current_list),': found '+str(len(peak_location))+' peaks.'