Login
or
register
Overview
Introduction
Features
Credits
License
This Wiki
Status
News
Releases
Change Log
Recent Wiki Edits
User Guide
Installation
Command Line
Using as a Module
Integration
Reporting Bugs
Advanced
Mailing List
Source Code
Test Suite
Extensions
Extensions
Writing Extensions
Available Extensions
Related Projects
Tickets
▹ 000042
overbroad exception catch
Anonymous users must enter
captcha
below.
Don't put anything here
Don't put anything here
Ticket Information
Ticket Title
Markdown.registerExtensions has this code: try: ext.extendMarkdown(self, globals()) except AttributeError: message(ERROR, "Incorrect type! Extension '%s' is " "neither a string or an Extension." %(repr(ext))) I just got confused by it, because I'd written md.preprocessor.add instead of md.preprocessors.add, and got the traceback pointing somewhere else entirely... it's not much for style, but a correct fix would be try: ext.extendMarkdown except AttributeError: message(ERROR, "Incorrect type! Extension '%s' is " "neither a string or an Extension." %(repr(ext))) ext.extendMarkdown(self, globals()) so that the attribute check only applies to the specific local attribute. (Using hasattr is probably a lot clearer... parsing the AttributeError exception message is impractical.)
Reported by
Assigned to
Status
open
someday
resolved
closed
Resolution
n.a.
fixed
wontfix
Don't put anything here
Don't put anything here
Advanced Fields
Priority
unassigned
high
medium
low
Resolution Explanation
Component
About This Edit
Minor Edit
Edit Summary
Don't put anything here
Don't put anything here
save
preview
cancel
Powered by
Sputnik
|
XHTML 1.1