home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 July / maximum-cd-2011-07.iso / DiscContents / LibO_3.3.2_Win_x86_install_multi.exe / libreoffice1.cab / fix_standarderror.py < prev    next >
Encoding:
Python Source  |  2011-03-15  |  431 b   |  19 lines

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