From 85391e63eacfdfc6f2806222cf4e4d31298e5b38 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 14 Aug 2017 13:41:58 +0200 Subject: [PATCH] execfile not available in Python 3, replacing with exec alternative --- dtls/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtls/__init__.py b/dtls/__init__.py index 8b122cd..bbabf78 100644 --- a/dtls/__init__.py +++ b/dtls/__init__.py @@ -48,7 +48,7 @@ def _prep_bins(): prebuilt_path = path.join(package_root, "prebuilt", platform + bit_suffix) config = {"MANIFEST_DIR": prebuilt_path} try: - execfile(path.join(prebuilt_path, "manifest.pycfg"), config) + exec(compile(open(path.join(prebuilt_path, "manifest.pycfg"), "rb").read()), config) except IOError: return # there are no prebuilts for this platform - nothing to do files = map(lambda x: path.join(prebuilt_path, x), config["FILES"])