#5155: Fix doctests and methods that want write access to $SAGE_LOCAL
------------------------+---------------------------------------------------
Reporter: mabshoff | Owner: jdemeyer
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-4.7.3
Component: scripts | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Mike Hansen
Merged: | Dependencies: #11920, #11926, #11933
------------------------+---------------------------------------------------
Comment(by jhpalmieri):
Replying to [comment:20 jdemeyer]:
> John, you are assuming a failure means that there was a problem was
permissions. We should probably catch `IOError` (and also `OSError`
perhaps?) and print the message which came with the exception.
I think that a permissions problem is the most likely issue. I've
modified the patch a bit: if it looks like bad permissions, print a
friendly error message. If it's an `IOError` unrelated to permissions,
explicitly raise the error. If it's some other kind of error, don't catch
it at all, so it should get raised, too. You can test this by changing my
patch: change the line
{{{
if e.strerror.find('Permission denied') != -1:
}}}
by changing `!=` to `==`, or on the previous line, change `IOError` to
`ValueError` or something else irrelevant. Move sage and make the
directory unwriteable; then when you run sage, you should see the raw
error message.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5155#comment:21>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.