From 16fbe19986b8cc36873b24bd2b8f61cffd1b1d29 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 11 Sep 2013 12:41:51 +0200 Subject: catch indexerror on first utility --- src/leap/bitmask/util/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3