better ship detectionn, print if looping

This commit is contained in:
j 2012-04-24 12:20:45 +02:00
parent ca3ac107a2
commit 8c993c7555

View File

@ -54,9 +54,7 @@ def toHtml():
def isShip(row):
try:
# if str(int(row[0])) == row[0]:
# return True
if row[0].strip().lower() == 'import' or row[0].strip().lower() == 'rexport':
if row[0].isdigit() or row[0].strip().lower() == 'import' or row[0].strip().lower() == 'rexport':
return True
else:
return False
@ -101,6 +99,9 @@ def csvToJSON(prefix):
break
currRow = rows[i]
ships.append(thisShip)
else:
print c
print thisRow
data['ships'] = ships
d.append(data)
outFile = prefix + "Data.json"