fix(python): corrige le code pour une debian buster nue

This commit is contained in:
François Poulain 2020-08-15 16:33:22 +02:00
parent 8ea43a3727
commit 2b169ee80f
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ from django.db.models import F
from django.utils.timezone import make_aware, now
import mediafile
import request
import requests
from bs4 import BeautifulSoup as bs
from PIL import Image
@ -77,7 +77,7 @@ def download(src, filename, force_download):
path = os.path.join(settings.SPIP_LOGO_DIR, filename)
if not os.access(path, os.F_OK) or force_download:
r = request.get(src, stream=True)
r = requests.get(src, stream=True)
with open(path, 'wb') as fd:
for chunk in r.iter_content(chunk_size=128):