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

catch exception in copystat #5357

Merged
merged 2 commits into from Mar 19, 2014
Merged

catch exception in copystat #5357

merged 2 commits into from Mar 19, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 14, 2014

instead of using copy2 in FileNotebookManager

closes #5351

@minrk minrk added this to the 2.0 milestone Mar 15, 2014
@takluyver
Copy link
Member

I think when the fallback is needed, this will actually end up copying the file three times, because each attempt will only fail after writing the file.

The implementation of copy2 simply does copyfile() followed by copystat(). Why don't we do the same, and silence errors (possibly selectively) from copystat()?

@minrk
Copy link
Member Author

minrk commented Mar 19, 2014

better!

@minrk minrk changed the title fallback on copy, copyfile if copy2 fails catch exception in copystat Mar 19, 2014
@minrk
Copy link
Member Author

minrk commented Mar 19, 2014

now uses copyfile and try/except around copystat

takluyver added a commit that referenced this pull request Mar 19, 2014
catch exception in copystat
@takluyver takluyver merged commit 2a9ed0e into ipython:master Mar 19, 2014
@minrk minrk deleted the smb-fails branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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.

Notebook saving fails on smb share
2 participants