diff options
author | Robert Kern <robert.kern@gmail.com> | 2010-01-29 22:50:54 +0000 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2010-01-29 22:50:54 +0000 |
commit | 5dc876da5f2d6b23de7491f5dfdd9037f6ad3ef1 (patch) | |
tree | 8c8b5fd96e37d68c7fd29aa9d4e2dd8cbecf7fef /numpy/distutils/misc_util.py | |
parent | 7a53c06984d33b1af8e46d4beb8b7ea214713588 (diff) | |
download | numpy-5dc876da5f2d6b23de7491f5dfdd9037f6ad3ef1.tar.gz |
BUG: Add more protection against uninitialized lists on the Distribution object.
Diffstat (limited to 'numpy/distutils/misc_util.py')
-rw-r--r-- | numpy/distutils/misc_util.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index 1f7874974..84f1fa498 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -1275,6 +1275,8 @@ class Configuration(object): include_dirs = self.paths(paths) dist = self.get_distribution() if dist is not None: + if dist.include_dirs is None: + dist.include_dirs = [] dist.include_dirs.extend(include_dirs) else: self.include_dirs.extend(include_dirs) @@ -1311,6 +1313,8 @@ class Configuration(object): [headers.append((path[0],p)) for p in self.paths(path[1])] dist = self.get_distribution() if dist is not None: + if dist.headers is None: + dist.headers = [] dist.headers.extend(headers) else: self.headers.extend(headers) @@ -1655,6 +1659,8 @@ class Configuration(object): pre_hook, post_hook, full_source_files, package_path) if dist is not None: + if dist.scons_data is None: + dist.scons_data = [] dist.scons_data.append(scons_info) self.warn('distutils distribution has been initialized,'\ ' it may be too late to add a subpackage '+ subpackage_name) |