From: Sjoerd Mullender Date: Fri, 18 Jun 2004 20:39:11 +0000 (+0000) Subject: If self.packages is None (this can happen, I saw it), return X-Git-Tag: v2.4a1~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dbda47aea1759faa68e491237f078cf0c7050be;p=thirdparty%2FPython%2Fcpython.git If self.packages is None (this can happen, I saw it), return immediately (since None is not a sequence you can iterate over). --- diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index cfbab262ccd3..3079bfcdef3d 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -104,6 +104,8 @@ class build_py (Command): def get_data_files (self): """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" data = [] + if not self.packages: + return data for package in self.packages: # Locate package source directory src_dir = self.get_package_dir(package)