Skip to content

Commit

Permalink
Improve inference of the "correct" package dir
Browse files Browse the repository at this point in the history
Signed-off-by: Abrar Rahman Protyasha <[email protected]>
  • Loading branch information
Abrar Rahman Protyasha committed Aug 14, 2021
1 parent eef02f1 commit 5d84071
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rosdoc2/verbs/build/builders/sphinx_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ def build(self, *, doc_build_folder, output_staging_directory):
package_xml_directory,
package_list[package_list.index(self.build_context.package.name)])
except ValueError:
package_src_directory = ''
if not package_src_directory:
package_src_directory = None

if not package_src_directory or not os.path.isdir(package_src_directory):
raise RuntimeError('Could not locate source directory to invoke sphinx-apidoc in. '
'If this is package does not have a standard Python package layout, '
'please specify the Python source in `rosdoc2.yaml`.')
Expand Down

0 comments on commit 5d84071

Please sign in to comment.