valid = True
cas = record['CAS#']
if len(cas.split(CAS_DELIM)) == 0 : # cas = 'N...N-NN-N'
- if not valid_CASno(cas, options.verbose):
+ if not chemdb.chemdb.valid_CASno(cas, options.verbose):
valid = False
print >> ofile, "Invalid CAS# in record: '%s'" % cas
else : # cas = 'N...N-NN-N:X%,N...N-NN-N:Y%,...'
for casterm in cas.split(CAS_DELIM) : # casterm = 'N...N-NN-N:X%'
c = casterm.split(PERCENT_DELIM)[0] # c = 'N...N-NN-N'
- if not valid_CASno(c, options.verbose):
+ if not chemdb.chemdb.valid_CASno(c, options.verbose):
valid = False
print >> ofile, "Invalid CAS* in record: '%s'" % c
if not valid: