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

master
François Poulain 2 years ago
parent 8ea43a3727
commit 2b169ee80f
  1. 4
      drupal2spip_lal/base/convert.py

@ -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):
fd.write(chunk)

Loading…
Cancel
Save