summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Compat.py')
-rw-r--r--src/lib/Bcfg2/Compat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Compat.py b/src/lib/Bcfg2/Compat.py
index 74f660216..a045929bb 100644
--- a/src/lib/Bcfg2/Compat.py
+++ b/src/lib/Bcfg2/Compat.py
@@ -222,9 +222,16 @@ except ImportError:
try:
all = all
+ any = any
except NameError:
def all(iterable):
for element in iterable:
if not element:
return False
return True
+
+ def any(iterable):
+ for element in iterable:
+ if element:
+ return True
+ return False