File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 99import base64
1010from hashlib import sha1
1111from iron_cache import *
12+ import traceback as tb
1213
1314key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
1415 os .environ .get ('JOB_NAME' ,'unk' ))
16+ print (key )
17+
1518if sys .version_info [0 ] > 2 :
16- key = sha1 ( bytes (key ,encoding = 'utf8' )). hexdigest ()[: 8 ] + '.'
17- else :
18- key = sha1 (key ).hexdigest ()[:8 ]+ '.'
19+ key = bytes (key ,encoding = 'utf8' )
20+
21+ key = sha1 (key ).hexdigest ()[:8 ]+ '.'
1922
2023b = b''
2124cache = IronCache ()
2225for i in range (20 ):
2326 print ("getting %s" % key + str (i ))
2427 try :
2528 item = cache .get (cache = "travis" , key = key + str (i ))
26- b += bytes (base64 .b64decode (item .value ))
27- except :
29+ v = item .value
30+ if sys .version_info [0 ] > 2 :
31+ v = bytes (v ,encoding = 'utf8' )
32+ b += bytes (base64 .b64decode (v ))
33+ except Exception as e :
34+ try :
35+ print (tb .format_exc (e ))
36+ except :
37+ print ("exception during exception, oh my" )
2838 break
2939
3040with open (os .path .join (os .environ .get ('HOME' ,'' ),"ccache.7z" ),'wb' ) as f :
Original file line number Diff line number Diff line change 1212
1313key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
1414 os .environ .get ('JOB_NAME' ,'unk' ))
15+
16+ key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
17+ os .environ .get ('JOB_NAME' ,'unk' ))
18+ print (key )
19+
1520if sys .version_info [0 ] > 2 :
16- key = sha1 ( bytes (key ,encoding = 'utf8' )). hexdigest ()[: 8 ] + '.'
17- else :
18- key = sha1 (key ).hexdigest ()[:8 ]+ '.'
21+ key = bytes (key ,encoding = 'utf8' )
22+
23+ key = sha1 (key ).hexdigest ()[:8 ]+ '.'
1924
2025os .chdir (os .environ .get ('HOME' ))
2126
You can’t perform that action at this time.
0 commit comments