Skip to content

Commit

Permalink
Add assert into realtime. #9
Browse files Browse the repository at this point in the history
  • Loading branch information
toomore committed Jan 10, 2014
1 parent cc4e644 commit eccd55d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions grs/realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class RealtimeStock(object):
crosspic: K線圖 by Google Chart
"""
def __init__(self, no):
assert isinstance(no, str), '`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 eccd55d

Please sign in to comment.