# HG changeset patch # User Mads Kiilerich # Date 2020-02-05 23:04:10 # Node ID 6e537f0a9961cb1aea11abdb0c323b0585a62b43 # Parent fb4b72c1c0f13b199d451951012dbaac1949852a py3: automatic migration with 2to3 -f execfile diff --git a/kallithea/lib/vcs/utils/fakemod.py b/kallithea/lib/vcs/utils/fakemod.py --- a/kallithea/lib/vcs/utils/fakemod.py +++ b/kallithea/lib/vcs/utils/fakemod.py @@ -9,5 +9,5 @@ def create_module(name, path): """ module = imp.new_module(name) module.__file__ = path - execfile(path, module.__dict__) + exec(compile(open(path, "rb").read(), path, 'exec'), module.__dict__) return module