diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 17:22:03 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 17:22:03 (GMT) |
commit | 346c92195cc7d2fe55f92a97cc6c99749fb3dfae (patch) | |
tree | 04bbc9b40db20814593634a42343b03b8df7ea65 /Lib/lib2to3 | |
parent | be02395ef99f6faaef6919b13cfb8d117a574cb1 (diff) | |
download | cpython-346c92195cc7d2fe55f92a97cc6c99749fb3dfae.zip cpython-346c92195cc7d2fe55f92a97cc6c99749fb3dfae.tar.gz cpython-346c92195cc7d2fe55f92a97cc6c99749fb3dfae.tar.bz2 |
Merged revisions 63644 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r63644 | martin.v.loewis | 2008-05-25 19:19:22 +0200 (So, 25 Mai 2008) | 10 lines
Merged revisions 63634-63643 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r63643 | martin.v.loewis | 2008-05-25 19:18:21 +0200 (So, 25 Mai 2008) | 3 lines
Don't abort on IOErrors caused by saving pickle files.
Fixes #2938.
........
................
Diffstat (limited to 'Lib/lib2to3')
-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) |