From 8c993c7555174f44439d116806e9b25621b3d9c6 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 24 Apr 2012 12:20:45 +0200 Subject: [PATCH] better ship detectionn, print if looping --- manifests/ships/convert.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/ships/convert.py b/manifests/ships/convert.py index 4aa6c01..d85d148 100755 --- a/manifests/ships/convert.py +++ b/manifests/ships/convert.py @@ -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"