]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_sys_exc.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / lib2to3 / fixes / fix_sys_exc.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_sys_exc.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_sys_exc.py
deleted file mode 100644 (file)
index 2502aac..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""Fixer for sys.exc_{type, value, traceback}\r
-\r
-sys.exc_type -> sys.exc_info()[0]\r
-sys.exc_value -> sys.exc_info()[1]\r
-sys.exc_traceback -> sys.exc_info()[2]\r
-"""\r
-\r
-# By Jeff Balogh and Benjamin Peterson\r
-\r
-# Local imports\r
-from .. import fixer_base\r
-from ..fixer_util import Attr, Call, Name, Number, Subscript, Node, syms\r
-\r
-class FixSysExc(fixer_base.BaseFix):\r
-    # This order matches the ordering of sys.exc_info().\r
-    exc_info = [u"exc_type", u"exc_value", u"exc_traceback"]\r
-    BM_compatible = True\r
-    PATTERN = """\r
-              power< 'sys' trailer< dot='.' attribute=(%s) > >\r
-              """ % '|'.join("'%s'" % e for e in exc_info)\r
-\r
-    def transform(self, node, results):\r
-        sys_attr = results["attribute"][0]\r
-        index = Number(self.exc_info.index(sys_attr.value))\r
-\r
-        call = Call(Name(u"exc_info"), prefix=sys_attr.prefix)\r
-        attr = Attr(Name(u"sys"), call)\r
-        attr[1].children[0].prefix = results["dot"].prefix\r
-        attr.append(Subscript(index))\r
-        return Node(syms.power, attr, prefix=node.prefix)\r