aboutsummaryrefslogtreecommitdiffstats
path: root/python/intex
diff options
context:
space:
mode:
Diffstat (limited to 'python/intex')
-rw-r--r--python/intex/load_indicative.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/python/intex/load_indicative.py b/python/intex/load_indicative.py
index d2778a3a..ae0faf9f 100644
--- a/python/intex/load_indicative.py
+++ b/python/intex/load_indicative.py
@@ -115,7 +115,9 @@ def upload_deal_data(conn, filename):
continue
for key in line.keys():
line[key] = convertToNone(line[key])
+ ##simpler names
line["CDOpercent"] = line["CDO Pct of Assets that are Structured Finance Obligations"]
+ line['defaultedbal'] = line["CDO Defaulted Security Balance (Reported)"]
line["Paid Down"] = None
if "Paid Down" in line["Latest Update"]:
line["Paid Down"] = re.sub("Paid Down: ","", line["Latest Update"])
@@ -130,14 +132,11 @@ def upload_deal_data(conn, filename):
if line["Pay Day"]:
line["Pay Day"] = line["Pay Day"].day
for key in ["Collection Account Principal Balance", "Collection Account Interest Balance",
- "Curr Deal Bal", "Tranche Curr Bal",
- "CDO Pct of Assets that are Structured Finance Obligations",
- "CDO Defaulted Security Balance (Reported)"]:
+ "Curr Deal Bal", "Tranche Curr Bal", "CDOpercent", "defaultedbal"]:
if line[key]:
line[key] = sanitize_float(line[key])
line['Deal/Tranche ID'] = line['Deal/Tranche ID'].lower()
dealname = line['Deal/Tranche ID']
- line['defaultedbal'] = line["CDO Defaulted Security Balance (Reported)"]
if dealname not in deallist2:
for key in ["Orig Deal Bal", "Tranche Orig Bal"]:
if line[key]:
@@ -153,7 +152,7 @@ def upload_deal_data(conn, filename):
c.execute(sqlstr, line)
except (psycopg2.DataError, KeyError) as detail:
logger.error(detail)
- pdb.set_trace()
+ continue
with conn.cursor() as c:
if line['Paid Down']:
c.execute("UPDATE deal_indicative SET paid_down=%s WHERE dealname=%s",