From cfd54fbc88a006cfc8828cfecc00256a9a2bc35e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 18 Aug 2021 23:13:22 +0200 Subject: [PATCH] Fix pour Python 3.9: cgi.parse_qs -> urllib.parse.parse_qs --- app/scodoc/sco_groups_view.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index 6b298e10f..2525325ae 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -30,12 +30,14 @@ """ # Re-ecriture en 2014 (re-organisation de l'interface, modernisation du code) -import datetime -import cgi -import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error -import time + import collections +import datetime import operator +import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error +from urllib.parse import parse_qs +import time + from flask import url_for, g @@ -931,7 +933,7 @@ def form_choix_saisie_semaine(context, groups_infos, REQUEST=None): return "" # construit l'URL "destination" # (a laquelle on revient apres saisie absences) - query_args = cgi.parse_qs(REQUEST.QUERY_STRING) + query_args = parse_qs(REQUEST.QUERY_STRING) moduleimpl_id = query_args.get("moduleimpl_id", [""])[0] if "head_message" in query_args: del query_args["head_message"]