From c9f5ca232acccf412ef14aa294afd9deef4af93d Mon Sep 17 00:00:00 2001
From: Eli Bendersky <eliben@gmail.com>
Date: Sat, 20 Apr 2013 09:11:37 -0700
Subject: Remove superfluous try/except

---
 Lib/xml/etree/ElementTree.py | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index caa0087..b56ddff 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -1504,18 +1504,12 @@ class XMLParser:
         append = event_list.append
         for event in events:
             if event == "start":
-                try:
-                    parser.ordered_attributes = 1
-                    parser.specified_attributes = 1
-                    def handler(tag, attrib_in, event=event, append=append,
-                                start=self._start_list):
-                        append((event, start(tag, attrib_in)))
-                    parser.StartElementHandler = handler
-                except AttributeError:
-                    def handler(tag, attrib_in, event=event, append=append,
-                                start=self._start):
-                        append((event, start(tag, attrib_in)))
-                    parser.StartElementHandler = handler
+                parser.ordered_attributes = 1
+                parser.specified_attributes = 1
+                def handler(tag, attrib_in, event=event, append=append,
+                            start=self._start_list):
+                    append((event, start(tag, attrib_in)))
+                parser.StartElementHandler = handler
             elif event == "end":
                 def handler(tag, event=event, append=append,
                             end=self._end):
-- 
cgit v0.12