aboutsummaryrefslogtreecommitdiffstats
path: root/python/intex
diff options
context:
space:
mode:
Diffstat (limited to 'python/intex')
-rw-r--r--python/intex/load_indicative.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/intex/load_indicative.py b/python/intex/load_indicative.py
index cbbdef57..4808c776 100644
--- a/python/intex/load_indicative.py
+++ b/python/intex/load_indicative.py
@@ -116,7 +116,7 @@ def upload_deal_data(conn, filename):
sqlstr = "SELECT dealname FROM deal_indicative"
with conn.cursor() as c:
c.execute(sqlstr)
- deallist2 = [d[0] for d in c]
+ deallist2 = set([d for d, in c])
conn.commit()
with open(filename, "r") as fh:
dr = csv.DictReader(fh, dialect='excel-tab')
@@ -171,6 +171,10 @@ def upload_deal_data(conn, filename):
except (psycopg2.DataError, KeyError) as detail:
logger.error(detail)
continue
+ finally:
+ # update deallist2
+ if dealname not in deallist2:
+ deallist2 |= dealname
if dealname not in deallist1 or line['Latest Update'] not in deallist1[dealname]:
sqlstring = \
"INSERT INTO clo_universe " \