Opened 17 years ago
Last modified 16 years ago
#5339 closed defect
GeneratorExit thrown in trac/wiki/macros.py — at Version 2
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10.5 |
Component: | wiki system | Version: | 0.10.4 |
Severity: | normal | Keywords: | python25 |
Cc: | dluke@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Class UserMacroProvider throws an annoying error in method get_macros (with python 2.5). Simple (2 line) fix, where the GeneratorExit exception is ignored.
snippet from trac/wiki/macros.py
def get_macros(self): found = [] for path in (self.env_macros, self.site_macros): if not os.path.exists(path): continue for filename in [filename for filename in os.listdir(path) if filename.lower().endswith('.py') and not filename.startswith('__')]: try: module = self._load_macro(filename[:-3]) name = module.__name__ if name in found: continue found.append(name) yield name except GeneratorExit: pass except Exception, e: self.log.error('Failed to load wiki macro %s (%s)', filename, e, exc_info=True)
Change History (2)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Description: | modified (diff) |
---|---|
Keywords: | python25 verify added; generator GeneratorExit yield exception removed |
Milestone: | → 0.10.5 |
Summary: | trac/wiki/macros.py and python 2.5 → GeneratorExit thrown in trac/wiki/macros.py |
Sorry, this report went unnoticed.
Note:
See TracTickets
for help on using tickets.
I can confirm this on 0.10.4. This ticket has been fallow for 4 months - is it likely to be fixed?