Handle string input for api dir

This was iterating over the settings assuming it was a list. We handle this as a
list in some instances, and recommend using a string in others. Just handle
both.
pull/70/head
Anthony Johnson 9 years ago
parent 26924f93e3
commit 11ad556d3e

@ -27,7 +27,10 @@ def run_autoapi(app):
# Make sure the paths are full # Make sure the paths are full
normalized_dirs = [] normalized_dirs = []
for path in app.config.autoapi_dirs: autoapi_dirs = app.config.autoapi_dirs
if isinstance(autoapi_dirs, basestring):
autoapi_dirs = [autoapi_dirs]
for path in autoapi_dirs:
if os.path.isabs(path): if os.path.isabs(path):
normalized_dirs.append(path) normalized_dirs.append(path)
else: else:

Loading…
Cancel
Save