On affiche explicitement les fichiers vides (cf RCCF)

This commit is contained in:
Jean-Marie Favreau 2024-05-03 11:51:48 +02:00
parent 3daadf2b86
commit 00eb45c687
2 changed files with 209 additions and 202 deletions

View File

@ -6,6 +6,7 @@ import bbcode
from datetime import datetime, date, timedelta
from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
from django.utils.translation import gettext_lazy as _
from .extractor import *
@ -50,6 +51,8 @@ class ICALExtractor(Extractor):
def extract(
self, content, url, url_human=None, default_values=None, published=False
):
if content == "":
raise Exception(_('The source is empty'))
warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning)
print("Extracting ical events from {}".format(url))

File diff suppressed because it is too large Load Diff