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

PR: Add a safe getcwd function to handle errors when the current working was deleted #5336

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

rlaverde
Copy link
Member

Fixes: #5099

I think that returning home directory is better than returning None, because the calls of getcwd expect a directory, and returning None will cause other errors

Maybe a warning should be printed when falling back to home directory

I change it everywhere, except the tests and ipykernel file

@rlaverde rlaverde added this to the v3.2.4 milestone Sep 26, 2017
@rlaverde rlaverde self-assigned this Sep 26, 2017
@rlaverde rlaverde requested a review from ccordoba12 September 26, 2017 17:49
@pep8speaks
Copy link

pep8speaks commented Sep 26, 2017

Hello @rlaverde! Thanks for updating the PR.

Line 153:1: E402 module level import not at top of file
Line 159:1: E402 module level import not at top of file

Comment last updated on October 03, 2017 at 17:01 Hours UTC

@ccordoba12
Copy link
Member

This needs a rebase now and please also fix the pep8 issues reported above.

…directory is deleted for an external program.

- Didn't change it the ipykernel
- Didn't change it in the test
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rlaverde!

@ccordoba12 ccordoba12 merged commit e7f6e09 into spyder-ide:3.x Oct 4, 2017
ccordoba12 added a commit that referenced this pull request Oct 4, 2017
Fixes #5099

Conflicts:
- spyder/plugins/console.py
- spyder/plugins/findinfiles.py
- spyder/plugins/projects.py
- spyder/plugins/workingdirectory.py
@rlaverde rlaverde deleted the getcwd_fallback branch October 4, 2017 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants