We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de992b2 commit 231e55cCopy full SHA for 231e55c
1 file changed
src/bd2k/util/ec2/credentials.py
@@ -78,8 +78,10 @@ def _populate_keys_from_metadata_server( self ):
78
log.debug( 'Attempting to read cached credentials from %s.', path )
79
try:
80
with open( path, 'r' ) as f:
81
- record = f.read( ).split( '\n' )
82
- if record:
+ content = f.read( )
+ if content:
83
+ record = content.split( '\n' )
84
+ assert len(record) == 4
85
self._access_key = record[ 0 ]
86
self._secret_key = record[ 1 ]
87
self._security_token = record[ 2 ]
0 commit comments