Skip to content

Commit

Permalink
Fixed using basestring for stockno check.
Browse files Browse the repository at this point in the history
  • Loading branch information
toomore committed Apr 10, 2014
1 parent 6d8f484 commit 42df8da
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 42df8da

Please sign in to comment.