diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 17:19:22 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-05-25 17:19:22 (GMT) |
commit | bbaa2ebd17d1f2bd5a1d412bdfb7c323ec90586e (patch) | |
tree | 93f4aec400a96a46fb8b521b43522cd3b09bf6ca /Lib/lib2to3/pgen2 | |
parent | 367c79a4adb7bf5dec9cd501a0d772b6d95591ed (diff) | |
download | cpython-bbaa2ebd17d1f2bd5a1d412bdfb7c323ec90586e.zip cpython-bbaa2ebd17d1f2bd5a1d412bdfb7c323ec90586e.tar.gz cpython-bbaa2ebd17d1f2bd5a1d412bdfb7c323ec90586e.tar.bz2 |
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/pgen2')
-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 8a94f0d..b08f1d7 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) |