give information on files which could not be read and thus not be attended to the waveform container
This commit is contained in:
parent
82ac85d743
commit
1878b887f6
@ -134,13 +134,28 @@ class Data(object):
|
||||
self.dirty = False
|
||||
|
||||
def appendWFData(self, fnames):
|
||||
|
||||
if self.dirty is not False:
|
||||
self.resetWFData()
|
||||
|
||||
assert isinstance(fnames, list), "input parameter 'fnames' is " \
|
||||
"supposed to be of type 'list' " \
|
||||
"but is actually".format(type(
|
||||
fnames))
|
||||
|
||||
warnmsg = ''
|
||||
for fname in fnames:
|
||||
try:
|
||||
self.wfdata += read(fname)
|
||||
except TypeError:
|
||||
try:
|
||||
self.wfdata += read(fname, format='GSE2')
|
||||
except Exception:
|
||||
warnmsg += '{0}\n'.format(fname)
|
||||
if warnmsg:
|
||||
warnmsg = 'WARNING: unable to read\n' + warnmsg
|
||||
print warnmsg
|
||||
|
||||
|
||||
def getWFData(self):
|
||||
return self.wfdata
|
||||
|
Loading…
Reference in New Issue
Block a user