diff options
Diffstat (limited to 'coverage/tomlconfig.py')
-rw-r--r-- | coverage/tomlconfig.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/coverage/tomlconfig.py b/coverage/tomlconfig.py index 25542f99..3ad58157 100644 --- a/coverage/tomlconfig.py +++ b/coverage/tomlconfig.py @@ -11,6 +11,12 @@ from coverage import env from coverage.backward import configparser, path_types from coverage.misc import CoverageException, substitute_variables +# TOML support is an install-time extra option. +try: + import toml +except ImportError: # pragma: not covered + toml = None + class TomlDecodeError(Exception): """An exception class that exists even when toml isn't installed.""" @@ -29,8 +35,6 @@ class TomlConfigParser: self.data = None def read(self, filenames): - from coverage.optional import toml - # RawConfigParser takes a filename or list of filenames, but we only # ever call this with a single filename. assert isinstance(filenames, path_types) |