Fix imports of ConfigParser for python3.
This commit is contained in:
parent
557c16a6b9
commit
39b952af53
|
@ -58,7 +58,11 @@ For further examples please reference `.tests.test_api`.
|
|||
"""
|
||||
|
||||
import base64
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser
|
||||
except ModuleNotFoundError:
|
||||
import configparser as ConfigParser
|
||||
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||
import errno
|
||||
import hashlib
|
||||
import httplib
|
||||
|
|
|
@ -10,7 +10,11 @@ Bitmessage commandline interface
|
|||
# * python2-pythondialog
|
||||
# * dialog
|
||||
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser
|
||||
except ModuleNotFoundError:
|
||||
import configparser as ConfigParser
|
||||
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||
import curses
|
||||
import os
|
||||
import sys
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
BMConfigParser class definition and default configuration settings
|
||||
"""
|
||||
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser
|
||||
except ModuleNotFoundError:
|
||||
import configparser as ConfigParser
|
||||
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||
import os
|
||||
import shutil
|
||||
from datetime import datetime
|
||||
|
|
|
@ -35,7 +35,11 @@ Logging is thread-safe so you don't have to worry about locks,
|
|||
just import and log.
|
||||
"""
|
||||
|
||||
import ConfigParser
|
||||
try:
|
||||
import ConfigParser
|
||||
except ModuleNotFoundError:
|
||||
import configparser as ConfigParser
|
||||
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||
import logging
|
||||
import logging.config
|
||||
import os
|
||||
|
|
Loading…
Reference in New Issue
Block a user