diff --git a/Lib/lib2to3/pgen2/driver.py b/Lib/lib2to3/pgen2/driver.py index 8a94f0d4291..b08f1d71c72 100644 --- a/Lib/lib2to3/pgen2/driver.py +++ b/Lib/lib2to3/pgen2/driver.py @@ -126,7 +126,10 @@ def load_grammar(gt="Grammar.txt", gp=None, g = pgen.generate_grammar(gt) if save: logger.info("Writing grammar tables to %s", gp) - g.dump(gp) + try: + g.dump(gp) + except IOError, e: + logger.info("Writing failed:"+str(e)) else: g = grammar.Grammar() g.load(gp)