Skip to content

Commit dc1aedd

Browse files
committed
test_tools: import configparser
1 parent 8e399a2 commit dc1aedd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sopel/test_tools.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@
1919
# Licensed under the Eiffel Forum License 2.
2020
from __future__ import generator_stop
2121

22+
import configparser
2223
import os
2324
import re
2425
import tempfile
2526

26-
try:
27-
import ConfigParser
28-
except ImportError:
29-
import configparser as ConfigParser
30-
3127
from sopel import bot, config, tools
3228

3329

@@ -46,7 +42,7 @@ class MockConfig(config.Config):
4642
@tools.deprecated('use configfactory fixture instead', '7.0', '8.0')
4743
def __init__(self):
4844
self.filename = tempfile.mkstemp()[1]
49-
self.parser = ConfigParser.RawConfigParser(allow_no_value=True)
45+
self.parser = configparser.RawConfigParser(allow_no_value=True)
5046
self.parser.add_section('core')
5147
self.parser.set('core', 'owner', 'Embolalia')
5248
self.define_section('core', config.core_section.CoreSection)

0 commit comments

Comments
 (0)