From d4eb6a1ee106f323e367de21268ee8bb079f6702 Mon Sep 17 00:00:00 2001 From: Nuwan Goonasekera <2070605+nuwang@users.noreply.github.com> Date: Mon, 20 Sep 2021 10:17:18 +0530 Subject: [PATCH] If basespace.cfg doesn't exist, use constructor arguments --- src/BaseSpacePy/api/BaseSpaceAPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaseSpacePy/api/BaseSpaceAPI.py b/src/BaseSpacePy/api/BaseSpaceAPI.py index c6bd62a..16f315d 100755 --- a/src/BaseSpacePy/api/BaseSpaceAPI.py +++ b/src/BaseSpacePy/api/BaseSpaceAPI.py @@ -132,7 +132,7 @@ def _getLocalCredentials(self, profile): ''' config_file = os.path.join(os.path.expanduser('~/.basespace'), "%s.cfg" % profile) if not os.path.exists(config_file): - raise CredentialsException("Could not find config file: %s" % config_file) + return {} section_name = "DEFAULT" cred = {} config = configparser.SafeConfigParser()