diff options
author | Kali Kaneko <kali@leap.se> | 2013-09-11 12:41:51 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-09-11 15:32:29 +0200 |
commit | 16fbe19986b8cc36873b24bd2b8f61cffd1b1d29 (patch) | |
tree | 755520dded1ad339d1212204a4d6dcd62747b800 /src/leap/bitmask/util | |
parent | 55190af15f83d22ca3427d941714bb0b59e8b1cf (diff) |
catch indexerror on first utility
Diffstat (limited to 'src/leap/bitmask/util')
-rw-r--r-- | src/leap/bitmask/util/__init__.py | 2 |
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 |