Don’t let invalid line in setup.cfg pass silently
This commit is contained in:
parent
c6d52eddaa
commit
1f2bcd35bb
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue