From: Jason Kölker Date: Thu, 24 May 2012 17:17:21 +0000 (-0500) Subject: Log the exception so app loading issues can be debuged X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=686982198c146e7c982da175532eeabbd6379a60;p=openstack-build%2Fneutron-build.git Log the exception so app loading issues can be debuged * Fixes LP1004062 Change-Id: Iae04f2789fe310a52550354463fe109c13e8ceeb --- diff --git a/quantum/common/config.py b/quantum/common/config.py index b024ee3a6..6fda8eb93 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