diff libervia/pages/events/admin/page_meta.py @ 1229:acec8e9185db

pages: replaced deprecated `cgi.escape` by `html.escape`
author Goffi <goffi@goffi.org>
date Mon, 18 Nov 2019 21:49:42 +0100
parents b2d067339de3
children f511f8fbbf8a
line wrap: on
line diff
--- a/libervia/pages/events/admin/page_meta.py	Mon Nov 18 21:46:12 2019 +0100
+++ b/libervia/pages/events/admin/page_meta.py	Mon Nov 18 21:49:42 2019 +0100
@@ -8,7 +8,7 @@
 from sat.core.i18n import _
 from sat.core.log import getLogger
 import time
-import cgi
+import html
 import math
 import re
 
@@ -59,7 +59,7 @@
                 background-size: 15em;
             }
             """
-            % cgi.escape(background_image, True)
+            % html.escape(background_image, True)
         )
     template_data["event"] = event_data
     invitees = yield self.host.bridgeCall(
@@ -137,7 +137,7 @@
         for invitee_jid_s in jids.split():
             try:
                 invitee_jid = jid.JID(invitee_jid_s)
-            except RuntimeError as e:
+            except RuntimeError:
                 log.warning(
                     _("this is not a valid jid: {jid}").format(jid=invitee_jid_s)
                 )