Skip to content

Commit

Permalink
MAI: pass debuglog to ply.yacc.yacc only if debug
Browse files Browse the repository at this point in the history
because otherwise `ply` will log messages.
This approach is similar to the method `astutils.ply.Parser.build`.
  • Loading branch information
johnyf committed Apr 6, 2017
1 parent c5f30a9 commit 2441156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion promela/yacc.py
Expand Up @@ -77,7 +77,7 @@ def build(self, tabmodule=None, outputdir='', write_tables=False,
"""
if tabmodule is None:
tabmodule = self.tabmodule
if debuglog is None:
if debug and debuglog is None:
debuglog = self.logger
self.parser = ply.yacc.yacc(
method='LALR',
Expand Down

0 comments on commit 2441156

Please sign in to comment.