Don't rely on case-sensitive imports, fix #282
We should burn PEP 235, bicameral scripts, encodings, Python2/3 compatibility, Windows, MacOS X, filenames, unicode (including composite characters), and the whole world. And LF/CR too, of course. Let's recreate a language relying on only two characters. Anyone interested?
This commit is contained in:
parent
85826fcb74
commit
e69bec1272
@ -39,19 +39,18 @@ Leading or ending slashes are trimmed from collection's path.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from .. import config, log
|
from .. import config, log
|
||||||
|
|
||||||
# Manage Python2/3 different modules
|
# Manage Python2/3 different modules
|
||||||
# pylint: disable=F0401
|
if sys.version_info[0] == 2:
|
||||||
try:
|
|
||||||
from configparser import ConfigParser
|
|
||||||
from io import StringIO
|
|
||||||
except ImportError:
|
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import ConfigParser
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
# pylint: enable=F0401
|
else:
|
||||||
|
from configparser import ConfigParser
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
|
|
||||||
DEFINED_RIGHTS = {
|
DEFINED_RIGHTS = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user