summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pbr/core.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pbr/core.py b/pbr/core.py
index 0aff652..0f4b94a 100644
--- a/pbr/core.py
+++ b/pbr/core.py
@@ -40,6 +40,7 @@
from distutils import core
from distutils import errors
+import logging
import os
import sys
import warnings
@@ -103,6 +104,10 @@ def pbr(dist, attr, value):
attrs = util.cfg_to_args(path)
except Exception:
e = sys.exc_info()[1]
+ # NB: This will output to the console if no explicit logging has
+ # been setup - but thats fine, this is a fatal distutils error, so
+ # being pretty isn't the #1 goal.. being diagnosable is.
+ logging.exception('Error parsing')
raise errors.DistutilsSetupError(
'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e))