From e578fab2207b411110c9ffa70970c52bf873f278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20S=C3=A5gfors?= Date: Tue, 1 Dec 2015 20:23:58 +0200 Subject: [PATCH] Add some more logging --- FixPath.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FixPath.py b/FixPath.py index e338598..1be6e08 100644 --- a/FixPath.py +++ b/FixPath.py @@ -12,6 +12,10 @@ def isMac(): return False +def log(message): + print("FixMacPath: " + message) + + if isMac(): fixPathSettings = None originalEnv = {} @@ -37,11 +41,14 @@ def fixPath(): currSysPath = getSysPath() # Basic sanity check to make sure our new path is not empty if len(currSysPath) < 1: + log("Something went wrong, generated PATH would have been empty. Aborting.") return False + log("Setting PATH to " + currSysPath) environ['PATH'] = currSysPath for pathItem in fixPathSettings.get("additional_path_items", []): + log("Adding additonal item " + pathItem + " to PATH") environ['PATH'] = pathItem + ':' + environ['PATH'] return True @@ -86,4 +93,4 @@ def plugin_unloaded(): else: # not isMac() - print("FixMacPath will not be loaded because current OS is not Mac OS X ('Darwin'). Found '" + platform.system() + "'") + log("FixMacPath will not be loaded because current OS is not Mac OS X ('Darwin'). Found '" + platform.system() + "'")