Return nice message when etcd section is missing

This commit is contained in:
ahmadbilalkhalid 2019-12-28 16:35:55 +05:00
parent ba515f0b48
commit 808271f3e0
2 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,3 @@
import argparse
import sys
import os import os
from ucloud.settings import settings from ucloud.settings import settings

View file

@ -30,7 +30,10 @@ class Settings(object):
self.config_key = config_key self.config_key = config_key
self.read_internal_values() self.read_internal_values()
try:
self.config_parser.read(self.config_file) self.config_parser.read(self.config_file)
except Exception as err:
logger.error('%s', err)
def get_etcd_client(self): def get_etcd_client(self):
args = tuple() args = tuple()