summaryrefslogtreecommitdiff
path: root/src/leap/util
diff options
context:
space:
mode:
authorchiiph <chiiph@chiiphs-MacBook-Air.local>2013-06-19 13:17:54 -0300
committerchiiph <chiiph@chiiphs-MacBook-Air.local>2013-06-19 13:17:54 -0300
commitf3cefee6e6c08d88edd0927545dd37c2ce6bbf67 (patch)
treec906794c16450a2b58bb8448d17527413b48ffdd /src/leap/util
parent365dc7009382c303c3d5cbb2106c68266ad14cd4 (diff)
parentb36fe9cf87bc1917abc0667756f01e6d4609cc4c (diff)
Merge remote-tracking branch 'kali/feature/linux_install_scripts_rev2' into develop
Diffstat (limited to 'src/leap/util')
-rw-r--r--src/leap/util/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/util/__init__.py b/src/leap/util/__init__.py
index 41358d38..5ceaede5 100644
--- a/src/leap/util/__init__.py
+++ b/src/leap/util/__init__.py
@@ -37,3 +37,13 @@ except ImportError:
pass
__full_version__ = __appname__ + '/' + str(__version__)
+
+
+def first(things):
+ """
+ Return the head of a collection.
+ """
+ try:
+ return things[0]
+ except TypeError:
+ return None