From f87db0a1ecf53faf038b421ad9c2a69b1e240a08 Mon Sep 17 00:00:00 2001 From: Geoffrey French Date: Sun, 31 Aug 2014 15:12:01 +0100 Subject: [PATCH] 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. --- skimage/io/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/io/__init__.py b/skimage/io/__init__.py index 144fef57..8f3b9bca 100644 --- a/skimage/io/__init__.py +++ b/skimage/io/__init__.py @@ -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)