diff options
author | chiiph <chiiph@chiiphs-MacBook-Air.local> | 2013-06-19 13:17:54 -0300 |
---|---|---|
committer | chiiph <chiiph@chiiphs-MacBook-Air.local> | 2013-06-19 13:17:54 -0300 |
commit | f3cefee6e6c08d88edd0927545dd37c2ce6bbf67 (patch) | |
tree | c906794c16450a2b58bb8448d17527413b48ffdd /src/leap/util/__init__.py | |
parent | 365dc7009382c303c3d5cbb2106c68266ad14cd4 (diff) | |
parent | b36fe9cf87bc1917abc0667756f01e6d4609cc4c (diff) |
Merge remote-tracking branch 'kali/feature/linux_install_scripts_rev2' into develop
Diffstat (limited to 'src/leap/util/__init__.py')
-rw-r--r-- | src/leap/util/__init__.py | 10 |
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 |