better ship detectionn, print if looping
This commit is contained in:
parent
ca3ac107a2
commit
8c993c7555
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user