Fix references to valid_CASno() in bin/chem_db.py
authorW. Trevor King <wking@drexel.edu>
Wed, 25 Aug 2010 11:59:57 +0000 (07:59 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 25 Aug 2010 11:59:57 +0000 (07:59 -0400)
bin/chem_db.py

index 9c9c4bad0951b6bec39ec6a24cacf81de5b32b86..0c1920b4bdafe7bc1a7e634e8f75679ad935556e 100755 (executable)
@@ -126,13 +126,13 @@ if __name__ == '__main__':
             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: