From 83c246f9877f4e381e0eb97e2b920f4c0bd37ab9 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 5 Jul 2016 17:18:33 +0200 Subject: [feat] make ValidationLevels iterable Needed by bytmask cli. - Related: #7965 --- keymanager/changes/next-changelog.txt | 1 + keymanager/src/leap/keymanager/validation.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/keymanager/changes/next-changelog.txt b/keymanager/changes/next-changelog.txt index 56ff7aa9..d34022f8 100644 --- a/keymanager/changes/next-changelog.txt +++ b/keymanager/changes/next-changelog.txt @@ -14,6 +14,7 @@ Features - `#8068 `_: make get_all_keys aware of active addresses. - `#6658 `_: Improve duplicated active documents fixup. - `#8165 `_: Check key document versions and fail if it's unknown. +- Make ValidationLevels iterable - `#1234 `_: Description of the new feature corresponding with issue #1234. - New feature without related issue number. diff --git a/keymanager/src/leap/keymanager/validation.py b/keymanager/src/leap/keymanager/validation.py index 8cf96da1..16a897e9 100644 --- a/keymanager/src/leap/keymanager/validation.py +++ b/keymanager/src/leap/keymanager/validation.py @@ -79,6 +79,9 @@ class _ValidationLevels(object): """ return getattr(self, name) + def __iter__(self): + return iter(self._level_names) + ValidationLevels = _ValidationLevels() -- cgit v1.2.3