diff options
author | Éric Araujo <merwok@netwok.org> | 2011-09-10 16:22:04 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-09-10 16:22:04 (GMT) |
commit | 1f2bcd35bb49fc17ee7842497ee5e46f9d2f5bef (patch) | |
tree | ff45447432cf7a4f874344183e6f4d6ec742952f /Lib | |
parent | c6d52eddaaa5fb8b8091480103188beda35a9f60 (diff) | |
download | cpython-1f2bcd35bb49fc17ee7842497ee5e46f9d2f5bef.zip cpython-1f2bcd35bb49fc17ee7842497ee5e46f9d2f5bef.tar.gz cpython-1f2bcd35bb49fc17ee7842497ee5e46f9d2f5bef.tar.bz2 |
Don’t let invalid line in setup.cfg pass silently
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/packaging/config.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/packaging/config.py b/Lib/packaging/config.py index e02800e..366faea 100644 --- a/Lib/packaging/config.py +++ b/Lib/packaging/config.py @@ -227,10 +227,11 @@ class Config: self.dist.scripts = [self.dist.scripts] self.dist.package_data = {} - for data in files.get('package_data', []): - data = data.split('=') + for line in files.get('package_data', []): + data = line.split('=') if len(data) != 2: - continue # FIXME errors should never pass silently + raise ValueError('invalid line for package_data: %s ' + '(misses "=")' % line) key, value = data self.dist.package_data[key.strip()] = value.strip() |