Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix issue:
Browse files Browse the repository at this point in the history
  if 'source' in obj and 'path' in obj['source'] and obj['source']['path'].endswith(INITPY):
AttributeError: 'NoneType' object has no attribute 'endswith'
  • Loading branch information
bianliu1013 committed Jul 28, 2017
1 parent e6f0094 commit 157b75e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docfx_yaml/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,10 @@ def find_node_in_toc_tree(toc_yaml, to_add_node):
return None

def convert_module_to_package_if_needed(obj):
if 'source' in obj and 'path' in obj['source'] and obj['source']['path'].endswith(INITPY):
obj['type'] = 'package'
return
if 'source' in obj and 'path' in obj['source'] and obj['source']['path']:
if obj['source']['path'].endswith(INITPY):
obj['type'] = 'package'
return

for child_uid in obj['children']:
if child_uid in app.env.docfx_info_uid_types:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='sphinx-docfx-yaml',
version='1.2.17',
version='1.2.18',
author='Eric Holscher',
author_email='eric@ericholscher.com',
url='https://github.com/ericholscher/sphinx-docfx-yaml',
Expand Down

0 comments on commit 157b75e

Please sign in to comment.