Making config optional
This commit removes the requirement for having a config file. Sometimes projects may want to use one to list out tests, define a profile, or override a setting, but they are no longer required. Change-Id: I6e467f58b2b27cae647901ac2c3f75a764e74c0c
This commit is contained in:
@@ -79,7 +79,9 @@ class BanditManager():
|
||||
self.scores = []
|
||||
|
||||
def _get_profile(self, profile_name):
|
||||
if profile_name not in self.b_conf.config['profiles']:
|
||||
if(not self.b_conf.get_option('profiles') or
|
||||
profile_name not in self.b_conf.config['profiles']):
|
||||
|
||||
raise utils.ProfileNotFound(self.b_conf.config_file, profile_name)
|
||||
|
||||
profile = self.b_conf.config['profiles'][profile_name]
|
||||
|
||||
Reference in New Issue
Block a user