diff options
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 |
commit | c256a757f82ef3963d137244373be69c97660fac (patch) | |
tree | 15fb4fcb36f0abf413140c2328babfdd7ec17e6a /Lib/distutils/command | |
parent | 4e59c71296270fb69a07501494b73b7fd7f62de9 (diff) | |
download | cpython-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.py | 5 |
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)) |