From 6f237179e46337704b17093cbd6c29a009a1322b Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Sat, 31 Dec 2016 20:42:15 +0000 Subject: [PATCH] Allow debug import --- overviewer_core/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overviewer_core/__init__.py b/overviewer_core/__init__.py index 6dc50db..ba12f33 100644 --- a/overviewer_core/__init__.py +++ b/overviewer_core/__init__.py @@ -3,6 +3,7 @@ # import os.path +import os import platform import traceback import sys @@ -19,6 +20,8 @@ def check_c_overviewer(): try: import c_overviewer except ImportError: + if os.environ.get("OVERVIEWER_DEBUG_IMPORT") == "1": + traceback.print_exc() ## if this is a frozen windows package, the following error messages about ## building the c_overviewer extension are not appropriate if hasattr(sys, "frozen") and platform.system() == 'Windows':