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