open_logfile fails if filename has no directory #150
Labels
auto-locked
Outdated issues that have been locked by automation
type: bug
A confirmed bug or unintended behavior
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.
The text was updated successfully, but these errors were encountered: