summaryrefslogtreecommitdiff
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-03 00:42:04 +0200
committerÉric Araujo <merwok@netwok.org>2011-09-03 00:42:04 +0200
commitc256a757f82ef3963d137244373be69c97660fac (patch)
tree15fb4fcb36f0abf413140c2328babfdd7ec17e6a /Lib/distutils/command
parent4e59c71296270fb69a07501494b73b7fd7f62de9 (diff)
downloadcpython-c256a757f82ef3963d137244373be69c97660fac.tar.gz
Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
sdist used to crash with a full traceback dump instead of printing a nice warning with the faulty line number.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/sdist.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 21ea61d96a..a9429a4296 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -306,7 +306,10 @@ class sdist(Command):
try:
self.filelist.process_template_line(line)
- except DistutilsTemplateError as msg:
+ # the call above can raise a DistutilsTemplateError for
+ # malformed lines, or a ValueError from the lower-level
+ # convert_path function
+ except (DistutilsTemplateError, ValueError) as msg:
self.warn("%s, line %d: %s" % (template.filename,
template.current_line,
msg))