fix_standarderror.py 425 Bytes
Newer Older
1 2 3 4 5 6
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for StandardError -> Exception."""

# Local imports
7 8
from .. import fixer_base
from ..fixer_util import Name
9 10


11
class FixStandarderror(fixer_base.BaseFix):
12 13 14 15 16 17

    PATTERN = """
              'StandardError'
              """

    def transform(self, node, results):
18
        return Name("Exception", prefix=node.prefix)