2800: Remove unnecessary sha1. Just use the tuple as an array key.
authorTom Clegg <tom@curoverse.com>
Mon, 18 Aug 2014 18:01:54 +0000 (14:01 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 18 Aug 2014 18:01:54 +0000 (14:01 -0400)
sdk/python/arvados/api.py

index 75247ab75c890ca8c22f6bdb4520bfd017b9baf1..3df24306df750bc0a4e574218cc86024cfe5b993 100644 (file)
@@ -4,7 +4,6 @@ import logging
 import os
 import re
 import types
-import hashlib
 
 import apiclient
 import apiclient.discovery
@@ -135,9 +134,7 @@ def api(version=None, cache=True, host=None, token=None, insecure=False, **kwarg
             'https://%s/discovery/v1/apis/{api}/{apiVersion}/rest' % (host,))
 
     if cache:
-        connprofile = hashlib.sha1(' '.join([
-            version, host, token, ('y' if insecure else 'n')
-        ])).hexdigest()
+        connprofile = (version, host, token, insecure)
         svc = conncache.get(connprofile)
         if svc:
             return svc