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

Comments

Projects
None yet
1 participant
@vbabiy
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

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

This should fix the issue. Please pull that changeset.

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

Thanks for reporting.


Original Comment By: Alexandre Conrad
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

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
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

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
Contributor

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

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment