Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx> --- stgit/utils.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/stgit/utils.py b/stgit/utils.py index 02e98e9..34c0f96 100644 --- a/stgit/utils.py +++ b/stgit/utils.py @@ -214,3 +214,18 @@ def make_patch_name(msg, unacceptable, default_name = 'patch'): suffix += 1 patchname = '%s-%d' % (patchname, suffix) return patchname + +# any and all functions are builtin in Python 2.5 and higher, but not +# in 2.4. +if not 'any' in dir(__builtins__): + def any(bools): + for b in bools: + if b: + return True + return False +if not 'all' in dir(__builtins__): + def all(bools): + for b in bools: + if not b: + return False + return True - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html