Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion MoinMoin/Page.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,11 @@ def send_page_content(self, request, body, format='wiki', format_args='', do_cac

def format(self, parser):
""" Format and write page content without caching """
parser.format(self.formatter)
try:
parser.format(self.formatter)
except ValueError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, is it only ValueError or do we also want to catch other exceptions here? Could also use Exception.

logging.error('======================> %s <==========================' % self.page_name)
raise

def execute(self, request, parser, code):
""" Write page content by executing cache code """
Expand Down
14 changes: 9 additions & 5 deletions MoinMoin/wikiutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1506,11 +1506,15 @@ def parse_quoted_separated(args, separator=',', name_value=True, seplimit=0):
seplimit=seplimit)
for item in l:
if isinstance(item, tuple):
key, value = item
if key is None:
key = u''
keywords[key] = value
positional = trailing
try:
key, value = item
if key is None:
key = u''
keywords[key] = value
positional = trailing
except ValueError:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are trying to catch this for line 1510 only, the except ...: block should be moved to the line below there and the "no exception" other commands into an else: block.

logging.error('Poblem %s' item)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

raise
else:
positional.append(item)

Expand Down