Skip to content
Snippets Groups Projects

Wrap psd read in try and except

Merged Charlie Hoy requested to merge psd_length into master
3 files
+ 6
3
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 3
0
@@ -539,6 +539,9 @@ class _GWInput(_Input):
"generated and the PSD data will not be added to the metafile."
)
try:
f = np.genfromtxt(file)
return PSD(f)
except ValueError:
f = np.genfromtxt(file, skip_footer=2)
return PSD(f)
except FileNotFoundError:
Loading