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))