From cf10d1731091776eada996c1c22b3e9b6eac4ec6 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Wed, 11 Jul 2018 13:44:52 -0500 Subject: [PATCH] proton: Handle errors in user_settings better --- proton | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/proton b/proton index 31966f29..b8718664 100755 --- a/proton +++ b/proton @@ -99,8 +99,14 @@ env["WINEPREFIX"] = prefix #load environment overrides if os.path.exists(basedir + "/user_settings.py"): - import user_settings - env.update(user_settings.user_settings) + try: + import user_settings + env.update(user_settings.user_settings) + except e: + log("************************************************") + log("THERE IS AN ERROR IN YOUR user_settings.py FILE:") + log("%s" % sys.exc_info()[1]) + log("************************************************") def check_environment(env_name, config_name): if not env_name in env: