diff --git a/mitogen/core.py b/mitogen/core.py index a7ff05b2..974b5209 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -1117,7 +1117,7 @@ class Importer(object): linecache.cache[path] = ( len(data), 0.0, - data.splitlines(), + [line+'\n' for line in data.splitlines()], path, ) diff --git a/tests/importer_test.py b/tests/importer_test.py index 5c970438..940c793a 100644 --- a/tests/importer_test.py +++ b/tests/importer_test.py @@ -212,5 +212,10 @@ class ImporterBlacklistTest(testlib.TestCase): self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) +class Python24LineCacheTest(testlib.TestCase): + # TODO: mitogen.core.Importer._update_linecache() + pass + + if __name__ == '__main__': unittest2.main()