aboutsummaryrefslogtreecommitdiffstats
path: root/python/intex/load_indicative.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/intex/load_indicative.py')
-rw-r--r--python/intex/load_indicative.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/intex/load_indicative.py b/python/intex/load_indicative.py
index 8fd75b6e..d8d87913 100644
--- a/python/intex/load_indicative.py
+++ b/python/intex/load_indicative.py
@@ -8,6 +8,8 @@ from common import root, sanitize_float
from db import conn
import logging
+logger = logging.getLogger(__name__)
+
def convertToNone(s):
return None if s in ["", "-", "NR"] else s
@@ -75,8 +77,8 @@ def upload_cusip_data(conn, filename):
with conn.cursor() as c:
c.execute(sqlstring, line)
except psycopg2.DataError as e:
- logging.error(e)
- logging.debug("uploaded: {0}".format(line['CUSIP']))
+ logger.error(e)
+ logger.debug("uploaded: {0}".format(line['CUSIP']))
conn.commit()
# for dealname in deals_to_update:
# with conn.cursor() as c:
@@ -146,7 +148,7 @@ def upload_deal_data(conn, filename):
with conn.cursor() as c:
c.execute(sqlstr, line)
except (psycopg2.DataError, KeyError) as detail:
- logging.error(detail)
+ logger.error(detail)
pdb.set_trace()
with conn.cursor() as c:
if line['Paid Down']:
@@ -164,7 +166,7 @@ def upload_deal_data(conn, filename):
c.execute(sqlstring, line)
deallist1[dealname] = [line['Latest Update']]
except (psycopg2.DataError, KeyError) as detail:
- logging.error(detail)
+ logger.error(detail)
pdb.set_trace()
conn.commit()