aboutsummaryrefslogtreecommitdiffstats
path: root/python/load_intex_collateral.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/load_intex_collateral.py')
-rw-r--r--python/load_intex_collateral.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/load_intex_collateral.py b/python/load_intex_collateral.py
index d6224fa2..f03fbffb 100644
--- a/python/load_intex_collateral.py
+++ b/python/load_intex_collateral.py
@@ -135,9 +135,11 @@ def upload_data(conn, dealnames, workdate):
row[0] = row[0] + "_tag_" + str(tag)
tag = tag + 1
c.execute(sqlstr, (dealname, updatedate) + tuple(row))
+ conn.commit()
except TypeError:
pdb.set_trace()
- conn.commit()
+ else:
+ conn.commit()
c.close()
if __name__ == "__main__":
if len(sys.argv) > 1:
@@ -148,7 +150,7 @@ if __name__ == "__main__":
dealnames = sys.argv[2:]
else:
dealnames = [re.sub("_AD.txt", "", d).lower() for d in
- os.listdir(os.path.join(common.root, "data", "Collaterals_" + workdate))]
+ os.listdir(os.path.join(root, "data", "Collaterals_" + workdate))]
upload_data(conn, dealnames, workdate)
conn.close()
print("done")