mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
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
1 changed files with 5 additions and 6 deletions
|
@ -39,19 +39,18 @@ Leading or ending slashes are trimmed from collection's path.
|
|||
"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
from .. import config, log
|
||||
|
||||
# Manage Python2/3 different modules
|
||||
# pylint: disable=F0401
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
from io import StringIO
|
||||
except ImportError:
|
||||
if sys.version_info[0] == 2:
|
||||
from ConfigParser import ConfigParser
|
||||
from StringIO import StringIO
|
||||
# pylint: enable=F0401
|
||||
else:
|
||||
from configparser import ConfigParser
|
||||
from io import StringIO
|
||||
|
||||
|
||||
DEFINED_RIGHTS = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue