Cleans up old imports of ConfigParser.
This commit is contained in:
parent
3e3a671837
commit
9d0a800d8b
@ -2,9 +2,6 @@ import io
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info[0] == 2:
|
if sys.version_info[0] == 2:
|
||||||
import ConfigParser as configparser
|
|
||||||
ConfigParser = configparser.SafeConfigParser
|
|
||||||
_read_config = ConfigParser.readfp
|
|
||||||
|
|
||||||
def input():
|
def input():
|
||||||
return raw_input().decode(sys.stdin.encoding or 'utf8', 'ignore')
|
return raw_input().decode(sys.stdin.encoding or 'utf8', 'ignore')
|
||||||
@ -30,9 +27,6 @@ if sys.version_info[0] == 2:
|
|||||||
return ustdio.read()
|
return ustdio.read()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
import configparser
|
|
||||||
ConfigParser = configparser.ConfigParser
|
|
||||||
_read_config = ConfigParser.read_file
|
|
||||||
ustr = str
|
ustr = str
|
||||||
uchr = chr
|
uchr = chr
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
@ -55,7 +49,6 @@ else:
|
|||||||
return stdio.read()
|
return stdio.read()
|
||||||
|
|
||||||
|
|
||||||
configparser = configparser
|
|
||||||
input = input
|
input = input
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import unittest
|
|||||||
|
|
||||||
import dotdot
|
import dotdot
|
||||||
from pubs.config import conf
|
from pubs.config import conf
|
||||||
from pubs.p3 import configparser
|
|
||||||
|
|
||||||
# class TestConfig(unittest.TestCase):
|
# class TestConfig(unittest.TestCase):
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user