Skip to content

Commit

Permalink
Merge branch 'fixed-stockno-basestring' of github.com:toomore/grs int…
Browse files Browse the repository at this point in the history
…o v0.5.2rc
  • Loading branch information
toomore committed Apr 10, 2014
2 parents 02a2e66 + 0f39d92 commit 38f6203
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grs/fetch_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def __init__(self, stock_no, mons=3, twse=False, otc=False):
pass

def __new__(cls, stock_no, mons=3, twse=False, otc=False):
assert isinstance(stock_no, str), '`stock_no` must be a string'
assert isinstance(stock_no, basestring), '`stock_no` must be a string'
assert not twse == otc == True, 'Only `twse` or `otc` to be True'

if twse and not otc:
Expand Down
2 changes: 1 addition & 1 deletion grs/realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RealtimeStock(object):
:rtype: dict
"""
def __init__(self, no):
assert isinstance(no, str), '`no` must be a string'
assert isinstance(no, basestring), '`no` must be a string'
self.__raw = ''
page = urllib2.urlopen(
'http://mis.tse.com.tw/data/{0}.csv?r={1}'.format(
Expand Down

0 comments on commit 38f6203

Please sign in to comment.