Skip to content

Commit b782252

Browse files
committed
Cleanup py2 import code in demo
1 parent a8982b3 commit b782252

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

demos/file_upload/file_receiver.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
"""
1010

1111
import logging
12-
13-
try:
14-
from urllib.parse import unquote
15-
except ImportError:
16-
# Python 2.
17-
from urllib import unquote
12+
from urllib.parse import unquote
1813

1914
import tornado.ioloop
2015
import tornado.web

demos/file_upload/file_uploader.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,9 @@
1313
import os
1414
import sys
1515
from functools import partial
16+
from urllib.parse import quote
1617
from uuid import uuid4
1718

18-
try:
19-
from urllib.parse import quote
20-
except ImportError:
21-
# Python 2.
22-
from urllib import quote
23-
2419
from tornado import gen, httpclient, ioloop
2520
from tornado.options import define, options
2621

0 commit comments

Comments
 (0)