blob: 6bdfc8dfaaadde62c18fdc91ea96c74ba961d8f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
changeset: 5625:99175953520e
branch: maint-1.6
parent: 5537:d698d3d843a9
user: Joseph Myers <jsm@polyomino.org.uk>
date: Mon Aug 20 00:50:16 2018 +0000
files: CHANGES.txt roundup/configuration.py
description:
Fix issue2550994: breakage caused by configparser backports.
diff -r d698d3d843a9 -r 99175953520e roundup/configuration.py
--- a/roundup/configuration.py Thu Sep 06 17:04:49 2018 -0400
+++ b/roundup/configuration.py Mon Aug 20 00:50:16 2018 +0000
@@ -2,9 +2,15 @@
#
__docformat__ = "restructuredtext"
-try:
+# Some systems have a backport of the Python 3 configparser module to
+# Python 2: <https://pypi.org/project/configparser/>. That breaks
+# Roundup if used with Python 2 because it generates unicode objects
+# where not expected by the Python code. Thus, a version check is
+# used here instead of try/except.
+import sys
+if sys.version_info[0] > 2:
import configparser # Python 3
-except ImportError:
+else:
import ConfigParser as configparser # Python 2
import getopt
@@ -12,7 +18,6 @@
import logging, logging.config
import os
import re
-import sys
import time
import smtplib
|