2012-11-25 | Paul Boddie | raw files shortlog changelog graph | Handle fragments without any real content. | |
MoinSupport.py (file) |
1.1 --- a/MoinSupport.py Thu Nov 22 23:05:50 2012 +0100 1.2 +++ b/MoinSupport.py Sun Nov 25 01:01:46 2012 +0100 1.3 @@ -268,7 +268,11 @@ 1.4 if body.startswith("#!"): 1.5 body = body[2:] 1.6 1.7 - arguments, body = body.split("\n", 1) 1.8 + try: 1.9 + arguments, body = body.split("\n", 1) 1.10 + except ValueError: 1.11 + arguments = body 1.12 + body = "" 1.13 1.14 # Get any parser/format declaration. 1.15