diff options
Diffstat (limited to 'Lib/lib2to3/pgen2/driver.py')
-rw-r--r-- | Lib/lib2to3/pgen2/driver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/lib2to3/pgen2/driver.py b/Lib/lib2to3/pgen2/driver.py index 665f1ca..f72bbca 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 as e: + logger.info("Writing failed:"+str(e)) else: g = grammar.Grammar() g.load(gp) |