From a5a0e792e8491f416d3188c42861ba0c62e94a79 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 03 2020 18:29:55 +0000 Subject: [PATCH 1/3] Do not assume there is a SMTP_STARTTLS configuration key set This is a new key that was introduced in 5.10.0 and that isn't set in the default_config. So we cannot assume it is defined and thus the code needs to not make this assumption either. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 2c4ee30..0c124db 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -506,7 +506,7 @@ def send_email( pagure_config["SMTP_PORT"], ) - if pagure_config["SMTP_STARTTLS"]: + if pagure_config.get("SMTP_STARTTLS"): context = ssl.create_default_context() keyfile = pagure_config.get("SMTP_KEYFILE") or None certfile = pagure_config.get("SMTP_CERTFILE") or None From 8f8e201bf25e5ee1fd359ecf97eb41d09320bcb2 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 03 2020 18:29:55 +0000 Subject: [PATCH 2/3] Ensure the title/name of the headers are strings Whether this is running py2 or py3, the headers should be strings. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/ui/clone.py b/pagure/ui/clone.py index 61615cc..33732a4 100644 --- a/pagure/ui/clone.py +++ b/pagure/ui/clone.py @@ -205,7 +205,7 @@ def proxy_raw_git(project): break header = line.split(b": ", 1) header[0] = header[0].decode("utf-8") - headers[header[0].lower()] = header[1] + headers[str(header[0].lower())] = header[1] if len(headers) == 0: raise Exception("No response at all received") From 907ba17242490b767c21cec877dd3ad322526ef6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 03 2020 18:29:55 +0000 Subject: [PATCH 3/3] Fix the title of the graph showing the evolution of the number of open tickets on a project Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/static/issues_stats.js b/pagure/static/issues_stats.js index 32b4c2a..5e81a3a 100644 --- a/pagure/static/issues_stats.js +++ b/pagure/static/issues_stats.js @@ -70,7 +70,7 @@ function issues_history_stats_plot(data) { }, title: { display: true, - text: 'Evolution of the number of commits over the last year' + text: 'Evolution of the number of open tickets over the last year' } } });