summaryrefslogtreecommitdiff
path: root/reconfigure/parsers/iniparse/__init__.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:27 +0200
committerAndrew Shadura <andrew@shadura.me>2015-08-20 15:58:27 +0200
commit25d6c405aff4167e801d0a4995083a56160b969e (patch)
tree070a400e9627b5b392dc3b57be4f889646ec2ea9 /reconfigure/parsers/iniparse/__init__.py
parentff1408420159488a106492ccd11dd234967029b6 (diff)
Imported Upstream version 0.1.39
Diffstat (limited to 'reconfigure/parsers/iniparse/__init__.py')
-rw-r--r--reconfigure/parsers/iniparse/__init__.py28
1 files changed, 18 insertions, 10 deletions
diff --git a/reconfigure/parsers/iniparse/__init__.py b/reconfigure/parsers/iniparse/__init__.py
index 618bd20..ca5d579 100644
--- a/reconfigure/parsers/iniparse/__init__.py
+++ b/reconfigure/parsers/iniparse/__init__.py
@@ -3,17 +3,25 @@
# Copyright (c) 2007 Tim Lauridsen <tla@rasmil.dk>
# All Rights Reserved. See LICENSE-PSF & LICENSE for details.
-from ini import INIConfig, change_comment_syntax
-from config import BasicConfig, ConfigNamespace
-from compat import RawConfigParser, ConfigParser, SafeConfigParser
-from utils import tidy
+from reconfigure.parsers.iniparse.ini import INIConfig, change_comment_syntax
+from reconfigure.parsers.iniparse.config import BasicConfig, ConfigNamespace
+from reconfigure.parsers.iniparse.compat import RawConfigParser, ConfigParser, SafeConfigParser
+from reconfigure.parsers.iniparse.utils import tidy
-from ConfigParser import DuplicateSectionError, \
- NoSectionError, NoOptionError, \
- InterpolationMissingOptionError, \
- InterpolationDepthError, \
- InterpolationSyntaxError, \
- DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+try:
+ from ConfigParser import DuplicateSectionError, \
+ NoSectionError, NoOptionError, \
+ InterpolationMissingOptionError, \
+ InterpolationDepthError, \
+ InterpolationSyntaxError, \
+ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+except ImportError:
+ from configparser import DuplicateSectionError, \
+ NoSectionError, NoOptionError, \
+ InterpolationMissingOptionError, \
+ InterpolationDepthError, \
+ InterpolationSyntaxError, \
+ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
__all__ = [
'BasicConfig', 'ConfigNamespace',