Fixes a bug in _update_doc in skimage/io/__init__.py that will attempt to compute max of empty list if no plugins are found.

This commit is contained in:
Geoffrey French
2014-08-31 15:12:01 +01:00
parent c30db5915a
commit f87db0a1ec
+2 -1
View File
@@ -40,7 +40,8 @@ def _update_doc(doc):
info_table = [(p, plugin_info(p).get('description', 'no description'))
for p in available_plugins if not p == 'test']
name_length = max([len(n) for (n, _) in info_table])
name_length = max([len(n) for (n, _) in info_table]) if len(info_table) > 0 else 0
description_length = WRAP_LEN - 1 - name_length
column_lengths = [name_length, description_length]
_format_plugin_info_table(info_table, column_lengths)