changeset 2960:b2417a0dd48f tip

trivial change to prevent traceback when 0 is passed to TableOfContents macro
author RogerHaase <haaserd@gmail.com>
date Thu, 18 Jun 2015 15:31:51 -0700
parents 0ac2c8e85ed3
children
files MoinMoin/converter/_wiki_macro.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/_wiki_macro.py	Thu Jun 18 14:56:18 2015 -0700
+++ b/MoinMoin/converter/_wiki_macro.py	Thu Jun 18 15:31:51 2015 -0700
@@ -104,7 +104,8 @@
         if args:
             try:
                 level = int(args[0])
-            except ValueError:
+                assert 0 < level < 7
+            except (ValueError, AssertionError):
                 pass
             else:
                 attrib[moin_page.outline_level] = str(level)