From 7e96104e7bb08827967275eda26723a473b1ce6c Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 18 Jan 2017 11:58:38 +0000 Subject: [PATCH] Fix: Sphinx extension on Python3 This patch is fixing the WSME Sphinx extension to work with Python 3. The patch just checks the return value from the find_service_path() method before it tries to do anything with it. Change-Id: I5a4cfa42a8768ce35a1c1a999431e842c7dde020 Closes-Bug: #1657435 --- wsmeext/sphinxext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wsmeext/sphinxext.py b/wsmeext/sphinxext.py index 9c8ffe3..177f25b 100644 --- a/wsmeext/sphinxext.py +++ b/wsmeext/sphinxext.py @@ -361,6 +361,8 @@ class ServiceDocumenter(autodoc.ClassDocumenter): def format_name(self): path = find_service_path(self.env, self.object) + if path is None: + return return '/' + '/'.join(path)