diff options
Diffstat (limited to 'tensorflow/tools/api/generator/create_python_api.py')
-rw-r--r-- | tensorflow/tools/api/generator/create_python_api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/tools/api/generator/create_python_api.py b/tensorflow/tools/api/generator/create_python_api.py index 671b7e387e..48d7dcd09e 100644 --- a/tensorflow/tools/api/generator/create_python_api.py +++ b/tensorflow/tools/api/generator/create_python_api.py @@ -180,7 +180,7 @@ def get_api_init_text(package, api_name): for module in list(sys.modules.values()): # Only look at tensorflow modules. if (not module or not hasattr(module, '__name__') or - package not in module.__name__): + module.__name__ is None or package not in module.__name__): continue # Do not generate __init__.py files for contrib modules for now. if '.contrib.' in module.__name__ or module.__name__.endswith('.contrib'): |