Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit e0408d7

Browse files
committed
remove warnings in tests for old python3 versions
1 parent 84a3ed8 commit e0408d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

twitter/cmdline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@
126126
}
127127

128128
try:
129-
unescape = HTMLParser.HTMLParser().unescape
130-
except AttributeError:
131129
import html
132130
unescape = html.unescape
131+
except ImportError:
132+
unescape = HTMLParser.HTMLParser().unescape
133133

134134
hashtagRe = re.compile(r'(?P<hashtag>#\S+)')
135135
profileRe = re.compile(r'(?P<profile>\@\S+)')

0 commit comments

Comments
 (0)