diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_standarderror.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_standarderror.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/lib2to3/fixes/fix_standarderror.py b/Lib/lib2to3/fixes/fix_standarderror.py new file mode 100644 index 0000000..61789d0 --- /dev/null +++ b/Lib/lib2to3/fixes/fix_standarderror.py @@ -0,0 +1,18 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Fixer for StandardError -> Exception.""" + +# Local imports +from .import basefix +from .util import Name + + +class FixStandarderror(basefix.BaseFix): + + PATTERN = """ + 'StandardError' + """ + + def transform(self, node, results): + return Name("Exception", prefix=node.get_prefix()) |