From 686982198c146e7c982da175532eeabbd6379a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Thu, 24 May 2012 12:17:21 -0500 Subject: [PATCH] Log the exception so app loading issues can be debuged * Fixes LP1004062 Change-Id: Iae04f2789fe310a52550354463fe109c13e8ceeb --- quantum/common/config.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quantum/common/config.py b/quantum/common/config.py index b024ee3a60..6fda8eb936 100644 --- a/quantum/common/config.py +++ b/quantum/common/config.py @@ -32,6 +32,7 @@ from paste import deploy from quantum.common import flags +LOG = logging.getLogger(__name__) DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s" DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" @@ -315,10 +316,11 @@ def load_paste_app(app_name, options, args): try: app = deploy.loadapp("config:%s" % conf_file, name=app_name) - except (LookupError, ImportError), e: - raise RuntimeError("Unable to load %(app_name)s from " - "configuration file %(conf_file)s." - "\nGot: %(e)r" % locals()) + except (LookupError, ImportError): + msg = ("Unable to load %(app_name)s from " + "configuration file %(conf_file)s.") % locals() + LOG.exception(msg) + raise RuntimeError(msg) return conf, app