mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
memoize aws creds
This commit is contained in:
@@ -147,6 +147,8 @@ class Config(ConfigI):
|
|||||||
def get_aws_credentials(self):
|
def get_aws_credentials(self):
|
||||||
""" gets aws credentials, looking in various places
|
""" gets aws credentials, looking in various places
|
||||||
|
|
||||||
|
Params:
|
||||||
|
|
||||||
Searches:
|
Searches:
|
||||||
1 any override in dvc.conf [AWS] CredentialPath;
|
1 any override in dvc.conf [AWS] CredentialPath;
|
||||||
2 ~/.aws/credentials
|
2 ~/.aws/credentials
|
||||||
@@ -218,6 +220,7 @@ class Config(ConfigI):
|
|||||||
creds = self.get_aws_credentials()
|
creds = self.get_aws_credentials()
|
||||||
if creds is None:
|
if creds is None:
|
||||||
errors.append('can\'t find aws credentials. TODO')
|
errors.append('can\'t find aws credentials. TODO')
|
||||||
|
self._aws_creds = creds
|
||||||
elif cloud == 'google':
|
elif cloud == 'google':
|
||||||
project = self._config['GC'].get('ProjectName', None)
|
project = self._config['GC'].get('ProjectName', None)
|
||||||
if project is None or len(project) < 1:
|
if project is None or len(project) < 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user