logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

fix_standarderror.py (449B)


  1. # Copyright 2007 Google, Inc. All Rights Reserved.
  2. # Licensed to PSF under a Contributor Agreement.
  3. """Fixer for StandardError -> Exception."""
  4. # Local imports
  5. from .. import fixer_base
  6. from ..fixer_util import Name
  7. class FixStandarderror(fixer_base.BaseFix):
  8. BM_compatible = True
  9. PATTERN = """
  10. 'StandardError'
  11. """
  12. def transform(self, node, results):
  13. return Name("Exception", prefix=node.prefix)