comparison roundup/configuration.py @ 5625:99175953520e maint-1.6

Fix issue2550994: breakage caused by configparser backports.
author Joseph Myers <jsm@polyomino.org.uk>
date Mon, 20 Aug 2018 00:50:16 +0000
parents 5a014410f254
children
comparison
equal deleted inserted replaced
5537:d698d3d843a9 5625:99175953520e
1 # Roundup Issue Tracker configuration support 1 # Roundup Issue Tracker configuration support
2 # 2 #
3 __docformat__ = "restructuredtext" 3 __docformat__ = "restructuredtext"
4 4
5 try: 5 # Some systems have a backport of the Python 3 configparser module to
6 # Python 2: <https://pypi.org/project/configparser/>. That breaks
7 # Roundup if used with Python 2 because it generates unicode objects
8 # where not expected by the Python code. Thus, a version check is
9 # used here instead of try/except.
10 import sys
11 if sys.version_info[0] > 2:
6 import configparser # Python 3 12 import configparser # Python 3
7 except ImportError: 13 else:
8 import ConfigParser as configparser # Python 2 14 import ConfigParser as configparser # Python 2
9 15
10 import getopt 16 import getopt
11 import imp 17 import imp
12 import logging, logging.config 18 import logging, logging.config
13 import os 19 import os
14 import re 20 import re
15 import sys
16 import time 21 import time
17 import smtplib 22 import smtplib
18 23
19 import roundup.date 24 import roundup.date
20 25

Roundup Issue Tracker: http://roundup-tracker.org/