summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-07-30 01:47:16 (GMT)
committerGreg Ward <gward@python.net>2000-07-30 01:47:16 (GMT)
commit6b24dffd13155ccd8ff33a4ad788452c16953574 (patch)
tree6244ab9e3621ad303b27837484272a3d92106efb /Lib/distutils
parent979db976a3a07e20df7664b567aba91a2d0b538c (diff)
downloadcpython-6b24dffd13155ccd8ff33a4ad788452c16953574.zip
cpython-6b24dffd13155ccd8ff33a4ad788452c16953574.tar.gz
cpython-6b24dffd13155ccd8ff33a4ad788452c16953574.tar.bz2
Catch syntax errors from processing template lines and turn them into
mere warnings. Call 'findall()' on our FileList object before we start using it seriously.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/sdist.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 4c2acf6..4765d7f 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -14,7 +14,7 @@ from distutils.util import \
create_tree, remove_tree, newer, write_file, \
check_archive_formats
from distutils.text_file import TextFile
-from distutils.errors import DistutilsExecError, DistutilsOptionError
+from distutils.errors import *
from distutils.filelist import FileList
@@ -227,6 +227,8 @@ class sdist (Command):
"(using default file list)") %
self.template)
+ self.filelist.findall()
+
# Add default file set to 'files'
if self.use_defaults:
self.add_defaults()
@@ -335,7 +337,12 @@ class sdist (Command):
if line is None: # end of file
break
- self.filelist.process_template_line(line)
+ try:
+ self.filelist.process_template_line(line)
+ except DistutilsTemplateError, msg:
+ self.warn("%s, line %d: %s" % (template.filename,
+ template.current_line,
+ msg))
# read_template ()