Skip to content
Myr

Merge pull request #489 from florentx/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

few typos

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 1a19ddc, a2eb5ef · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:scripts/flaskext_compat.py+3 added-3 removed
56 unmodified lines
57 __import__(realname)58 except ImportError:59 exc_type, exc_value, tb = sys.exc_info()60 # since we only establish the entry in sys.modules at the61 # very this seems to be redundant, but if recursive imports61 # end this seems to be redundant, but if recursive imports62 # happen we will call into the move import a second time.63 # On the second invocation we still don't have an entry for64 # fullname in sys.modules, but we will end up with the same65 # fake module name and that import will succeed since this
4 unmodified lines
70 sys.modules.pop(fullname, None)7172 # If it's an important traceback we reraise it, otherwise73 # we swallow it and try the next choice. The skipped frame74 # is the one from __import__ above which we don't care about74 # is the one from __import__ above which we don't care about.75 if self.is_important_traceback(realname, tb):76 raise exc_type, exc_value, tb.tb_next77 continue78 module = sys.modules[fullname] = sys.modules[realname]
26 unmodified lines
105 # name shows up properly here. Success!106 if module_name == important_module:107 return True108109 # Some python verisons will will clean up modules so early that the109 # Some python versions will clean up modules so early that the110 # module name at that point is no longer set. Try guessing from111 # the filename then.112 filename = os.path.abspath(tb.tb_frame.f_code.co_filename)113 test_string = os.path.sep + important_module.replace('.', os.path.sep)
11 unmodified lines