summaryrefslogtreecommitdiff
path: root/Lib/distutils/command
diff options
context:
space:
mode:
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))