added a check in a string search routine
authorhess <hess>
Fri, 15 Aug 2003 10:18:44 +0000 (10:18 +0000)
committerhess <hess>
Fri, 15 Aug 2003 10:18:44 +0000 (10:18 +0000)
scripts/make_gromos_rtp.py

index bb8ff3ab3542c5c209e2cc086a1cc22f0694b665..3dd338dafc052c7402dd7d721b68ebdd8bf77e31 100755 (executable)
@@ -122,9 +122,9 @@ class Cin:
        " Returns linenumber of string in list"
        for i in range(len(list)):
                 if list[i] == string:
-                   index = i
-       return index
-
+                   return i
+       print >> sys.stderr "Could not find string",string,"in list of length",len(list)
+       return -1
 
 #--------------------------#
 # unravel gromos list