added ‘1_*’ to ‘*’ as possible column label indicator
This commit is contained in:
parent
b5ef329f34
commit
99ffa554eb
|
@ -7,7 +7,7 @@ from optparse import OptionParser
|
||||||
import damask
|
import damask
|
||||||
|
|
||||||
scriptID = string.replace('$Id$','\n','\\n')
|
scriptID = string.replace('$Id$','\n','\\n')
|
||||||
scriptName = scriptID.split()[1][:-3]
|
scriptName = os.path.splitext(scriptID.split()[1])[0]
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# MAIN
|
# MAIN
|
||||||
|
@ -98,12 +98,12 @@ for file in files:
|
||||||
|
|
||||||
for datatype,info in datainfo.items():
|
for datatype,info in datainfo.items():
|
||||||
for label in info['label']:
|
for label in info['label']:
|
||||||
key = '1_'+label
|
key = list(set([label, '1_'+label]) & set(table.labels))
|
||||||
if key not in table.labels:
|
if key == []:
|
||||||
file['croak'].write('column %s not found...\n'%key)
|
file['croak'].write('column %s not found...\n'%label)
|
||||||
missingColumns = True # break if label not found
|
missingColumns = True # break if label not found
|
||||||
else:
|
else:
|
||||||
column[label] = table.labels.index(key) # remember columns of requested data
|
column[label] = table.labels.index(key[0]) # remember columns of requested data
|
||||||
|
|
||||||
if missingColumns:
|
if missingColumns:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue