BUG: Handle unicode adjustments path in py2.

In Python 2, passing unicode to SQLiteAdjustmentReader would fail to
coerce.
This commit is contained in:
Scott Sanderson
2016-01-12 17:37:28 -05:00
parent 43b6344d5f
commit c8b80dddb0
+3 -3
View File
@@ -45,10 +45,11 @@ from pandas import (
)
from six import (
iteritems,
string_types,
with_metaclass,
)
from zipline.utils.input_validation import coerce_string, preprocess
from ._equities import _compute_row_slices, _read_bcolz_data
from ._adjustments import load_adjustments_from_sqlite
@@ -910,9 +911,8 @@ class SQLiteAdjustmentReader(object):
Connection from which to load data.
"""
@preprocess(conn=coerce_string(sqlite3.connect))
def __init__(self, conn):
if isinstance(conn, str):
conn = sqlite3.connect(conn)
self.conn = conn
def load_adjustments(self, columns, dates, assets):