Join GitHub today
open_logfile fails if filename has no directory #150
http://bitbucket.org/ianb/pip/changeset/1719fb9024eb introduced behavior to create the log directory if it does not already exist. This fails, however, if the logfile is just a filename with no dirname.
In this case, dirname is an empty string, and os.path.exists('') is always False. os.makedirs('') fails with
OSError: [Errno 2] No such file or directory: ''
Changing line 188 to:
if dirname and not os.path.exists(dirname):
should resolve the issue.
I encountered this issue when using pip via gp.recipe.pip.
This should fix the issue. Please pull that changeset.
Thanks for reporting.