From 9951604d2d6c665d613935fe89ed5a98d62f6cf3 Mon Sep 17 00:00:00 2001 From: Dennis Burke Date: Mon, 5 Aug 2024 14:23:05 -0400 Subject: [PATCH] setting this back to what it was --- textile/tools/imagesize.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/textile/tools/imagesize.py b/textile/tools/imagesize.py index 1d758cce..6fba73eb 100644 --- a/textile/tools/imagesize.py +++ b/textile/tools/imagesize.py @@ -1,6 +1,3 @@ -from urllib.request import urlopen - - def getimagesize(url): """ Attempts to determine an image's width and height, and returns a tuple, @@ -14,6 +11,8 @@ def getimagesize(url): except ImportError: return '' + from urllib.request import urlopen + try: p = ImageFile.Parser() f = urlopen(url)