(pcluster.py) fixed crash when file not recognized
authordevicerandom <devnull@localhost>
Thu, 19 Feb 2009 11:30:57 +0000 (11:30 +0000)
committerdevicerandom <devnull@localhost>
Thu, 19 Feb 2009 11:30:57 +0000 (11:30 +0000)
pcluster.py

index a70a7b7a80745f7abde98f8fa93c9fae8b01e96b..08222c6eeaee3228427dd13852ff9cd0adcb40cb 100644 (file)
@@ -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.'