aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/markit/cds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/markit/cds.py b/python/markit/cds.py
index 8a7892e8..e080a015 100644
--- a/python/markit/cds.py
+++ b/python/markit/cds.py
@@ -16,9 +16,9 @@ def convertToNone(v):
def download_cds_data(payload):
r = requests.post('https://www.markit.com/export.jsp', params=payload)
- f2 = open(os.path.join(os.environ['BASE_DIR'], "Tranche_data", "CDS",
- "cds eod {0}.csv".format(payload['date'])), "wb")
with zipfile.ZipFile(io.BytesIO(r.content)) as z:
+ f2 = open(os.path.join(os.environ['BASE_DIR'], "Tranche_data", "CDS",
+ "cds eod {0}.csv".format(payload['date'])), "wb")
for f in z.namelist():
if "csv" in f:
f1 = z.open(f)