Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_logfile fails if filename has no directory #150

Closed
vbabiy opened this issue Mar 15, 2011 · 3 comments · Fixed by #10502
Closed

open_logfile fails if filename has no directory #150

vbabiy opened this issue Mar 15, 2011 · 3 comments · Fixed by #10502
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior

Comments

@vbabiy
Copy link
Contributor

vbabiy commented Mar 15, 2011

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.


@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

This should fix the issue. Please pull that changeset.

http://bitbucket.org/aconrad/pip/changeset/9a62890050bf

Thanks for reporting.


Original Comment By: Alexandre Conrad

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

fix logfile with no dirname; fixes #90

→ [Author: Carl Meyer

Age: 11 months ago

fix logfile with no dirname; fixes 90">r521:55a8f6a4ba1f]2

no


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Resolve dirname given a log filename like 'foo.log'. Fixes #90.

→ [Author: aconrad

Age: 11 months ago

Resolve dirname given a log filename like 'foo.log'. Fixes
90.">r530:9a62890050bf]2

no


Original Comment By: Ian Bicking

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant