diff options
| -rw-r--r-- | python/load_indicative.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/python/load_indicative.py b/python/load_indicative.py index a692c534..899e1e1d 100644 --- a/python/load_indicative.py +++ b/python/load_indicative.py @@ -97,7 +97,7 @@ def upload_deal_data(conn, filename): if not line['Deal Name, Tranche Name'] or (line['Deal Name, Tranche Name'] == 'Unknown Security'): continue if not line['Latest Update']: - break + continue for key in line.keys(): line[key] = convertToNone(line[key]) line["CDOpercent"] = line["CDO Pct of Assets that are Structured Finance Obligations"] @@ -136,10 +136,7 @@ def upload_deal_data(conn, filename): with conn.cursor() as c: c.execute(sqlstring, line) deallist[dealname] = line['Latest Update'] - except psycopg2.DataError as detail: - logging.error(detail) - pdb.set_trace() - except KeyError as detail: + except (psycopg2.DataError, KeyError) as detail: logging.error(detail) pdb.set_trace() conn.commit() |
