summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-03-06 15:12:08 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-03-06 15:12:08 (GMT)
commitd45a278b934a4a6f317c3c727ed45f5667d43ed5 (patch)
tree16697e25962ff35e9378ab9388d10746940396d9 /Lib/logging
parent12d750d6b8f4e25cd32277a954e787fc8ba10ad5 (diff)
downloadcpython-d45a278b934a4a6f317c3c727ed45f5667d43ed5.zip
cpython-d45a278b934a4a6f317c3c727ed45f5667d43ed5.tar.gz
cpython-d45a278b934a4a6f317c3c727ed45f5667d43ed5.tar.bz2
Added schema version test in dictConfig.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 1438388..7a2188f 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -484,6 +484,10 @@ class DictConfigurator(BaseConfigurator):
"""Do the configuration."""
config = self.config
+ if 'version' not in config:
+ raise ValueError("dictionary doesn't specify a version")
+ if config['version'] != 1:
+ raise ValueError("Unsupported version: %s" % config['version'])
incremental = config.pop('incremental', False)
EMPTY_DICT = {}
logging._acquireLock()