Commit 76be0551 authored by Michael Büsch's avatar Michael Büsch

util: Add helper to check if an object is iterable

Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent 0a695297
......@@ -226,3 +226,13 @@ def envClearLang(env, lang = "C"):
env.pop(i, None)
return env
def isiterable(obj):
"""Check if an object is iterable.
return True
except TypeError:
return False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment