From 4dbda47aea1759faa68e491237f078cf0c7050be Mon Sep 17 00:00:00 2001 From: Sjoerd Mullender Date: Fri, 18 Jun 2004 20:39:11 +0000 Subject: [PATCH] If self.packages is None (this can happen, I saw it), return immediately (since None is not a sequence you can iterate over). --- Lib/distutils/command/build_py.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index cfbab262cc..3079bfcdef 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) -- 2.50.1