summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-09-11 12:41:51 +0200
committerKali Kaneko <kali@leap.se>2013-09-11 16:43:29 +0200
commitf72e3c5d02b5d8c2272359b2bd6cd4963ddfe9cb (patch)
tree1314afed2de898d790da29d0e62942d5eadb6bc1 /src/leap/bitmask
parent6df266025131673a91ff40bbb715e836aaf1b49a (diff)
catch indexerror on first utility
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/util/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/bitmask/util/__init__.py b/src/leap/bitmask/util/__init__.py
index 6dd18bcf..78efcb6e 100644
--- a/src/leap/bitmask/util/__init__.py
+++ b/src/leap/bitmask/util/__init__.py
@@ -27,7 +27,7 @@ def first(things):
"""
try:
return things[0]
- except TypeError:
+ except (IndexError, TypeError):
return None