Browse files

finance.fetch_historical_yahoo: Create directories leading up to cach…


Previously, if cachename was specified, it would create the directories to
cachedir instead, resulting in OSError if the directories leading up to
cachename were not specified.
  • Loading branch information...
1 parent 2b2fa46 commit ae3195f0c70e7c89c9926ac61138b81a390b5ac7 @mgiuca-google committed Mar 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/matplotlib/
@@ -184,7 +184,7 @@ def fetch_historical_yahoo(ticker, date1, date2, cachename=None,dividends=False)
fh = open(cachename)'Using cachefile %s for %s'%(cachename, ticker))
- mkdirs(cachedir)
+ mkdirs(os.path.abspath(os.path.dirname(cachename)))
urlfh = urlopen(url)
fh = open(cachename, 'wb')

0 comments on commit ae3195f

Please sign in to comment.