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

wrong usage of except #9294

Closed
hemmecke opened this issue Jun 21, 2010 · 7 comments
Closed

wrong usage of except #9294

hemmecke opened this issue Jun 21, 2010 · 7 comments

Comments

@hemmecke
Copy link
Contributor

sagenb-0.8.p2/src/sagenb/sagenb/notebook/js.py

says

try:
from sage.misc.misc import SAGE_ROOT
from pkg_resources import Requirement, working_set
sagenb_path = working_set.find(Requirement.parse('sagenb')).location
debug_mode = SAGE_ROOT not in os.path.realpath(sagenb_path)
except AttributeError, ImportError:
debug_mode = False

But according to what I cite below, it should rather be

except (AttributeError, ImportError):

http://docs.python.org/tutorial/errors.html

CC: @hemmecke

Component: notebook

Author: Ralf Hemmecke

Reviewer: Tim Dumol

Merged: sagenb 0.8.1

Issue created by migration from https://trac.sagemath.org/ticket/9294

@hemmecke
Copy link
Contributor Author

Attachment: js-except-fix.diff.gz

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 5, 2010

Author: Ralf Hemmecke

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 5, 2010

Reviewer: Tim Dumol

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 5, 2010

comment:2

Nice catch! Positive review.

@hemmecke
Copy link
Contributor Author

hemmecke commented Jul 5, 2010

comment:3

See also

http://groups.google.com/group/sage-notebook/msg/e74a7366f9f50f3c

The bug seems to be fixed already.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 5, 2010

comment:4

Didn't seem to be the case when I applied the patch. The boxen.math url is just giving me a 500 error.

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 11, 2010

Merged: sagenb 0.8.1

@TimDumol TimDumol mannequin removed the s: positive review label Jul 11, 2010
@TimDumol TimDumol mannequin closed this as completed Jul 11, 2010
@sagetrac-mvngu sagetrac-mvngu mannequin added this to the sage-4.5 milestone Jul 13, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants