mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
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.
This commit is contained in:
parent
32e2915da5
commit
cfbd630a27
3 changed files with 34 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue