Ticket #6298: reflect-6298.patch
| File reflect-6298.patch, 1.1 KB (added by thijs, 3 months ago) |
|---|
-
twisted/python/_reflectpy3.py
194 194 administrative error (entering the wrong module name), from programmer 195 195 error (writing buggy code in a module that fails to import). 196 196 197 @param importName: The name of the module to import. 198 @type importName: L{str} 197 199 @raise Exception: if something bad happens. This can be any type of 198 200 exception, since nobody knows what loading some arbitrary code might do. 199 200 201 @raise _NoModuleFound: if no module was found. 201 202 """ 202 203 try: … … 205 206 excType, excValue, excTraceback = sys.exc_info() 206 207 while excTraceback: 207 208 execName = excTraceback.tb_frame.f_globals["__name__"] 208 if execName is None :209 if execName is None or execName == importName: 209 210 reraise(excValue, excTraceback) 210 211 excTraceback = excTraceback.tb_next 211 212 raise _NoModuleFound()
