From a0f1208ded16297217396afcc2fff470e4cd9769 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Wed, 26 Aug 2015 21:15:18 +0100 Subject: [PATCH] Fixed urllib --- spa/management/commands/get_avatars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/management/commands/get_avatars.py b/spa/management/commands/get_avatars.py index 6ab22fb..32d71de 100755 --- a/spa/management/commands/get_avatars.py +++ b/spa/management/commands/get_avatars.py @@ -14,7 +14,7 @@ from spa.models.userprofile import UserProfile def save_image(profile, url): img = NamedTemporaryFile(delete=True) - img.write(urllib.urlopen(url).read()) + img.write(urllib.request.urlopen(url).read()) img.flush() profile.avatar_image.save(str(profile.id), File(img))