diff --git a/textile/tools/imagesize.py b/textile/tools/imagesize.py index 6fba73eb..ec724a2c 100644 --- a/textile/tools/imagesize.py +++ b/textile/tools/imagesize.py @@ -1,3 +1,5 @@ +from urllib.request import urlopen + def getimagesize(url): """ Attempts to determine an image's width and height, and returns a tuple, @@ -11,8 +13,6 @@ def getimagesize(url): except ImportError: return '' - from urllib.request import urlopen - try: p = ImageFile.Parser() f = urlopen(url)