Skip to content

Commit e6d4630

Browse files
committed
removed try/catch blocks for python 2 import
1 parent 2796552 commit e6d4630

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

html5lib/_trie/_base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3-
try:
4-
from collections.abc import Mapping
5-
except ImportError: # Python 2.7
6-
from collections.abc import Mapping
3+
from collections.abc import Mapping
74

85

96
class Trie(Mapping):

html5lib/treebuilders/dom.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3-
4-
try:
5-
from collections.abc import MutableMapping
6-
except ImportError: # Python 2.7
7-
from collections.abc import MutableMapping
3+
from collections.abc import MutableMapping
84
from xml.dom import minidom, Node
95
import weakref
106

0 commit comments

Comments
 (0)