forked from uncloud/uncloud
Do not break if client section/or OTP creds missing from conf file
This commit is contained in:
parent
e91fd9e24a
commit
00d876aea1
4 changed files with 20 additions and 15 deletions
|
|
@ -99,12 +99,10 @@ class Settings(object):
|
|||
def read_config_file_values(self, config_file):
|
||||
try:
|
||||
# Trying to read configuration file
|
||||
with open(config_file, 'r') as config_file_handle:
|
||||
with open(config_file) as config_file_handle:
|
||||
self.config_parser.read_file(config_file_handle)
|
||||
except FileNotFoundError:
|
||||
sys.exit(
|
||||
'Configuration file {} not found!'.format(config_file)
|
||||
)
|
||||
sys.exit('Configuration file {} not found!'.format(config_file))
|
||||
except Exception as err:
|
||||
logger.exception(err)
|
||||
sys.exit('Error occurred while reading configuration file')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue