Prevent exception when LOG_FILE is empty
Previous version needed to set ARA_LOG_FILE to an empty string to avoid an AttributeError. This is now incompatible with 0.15.0 and it is now failing because the default_config is not properly formated: Unable to configure handler 'file': [Errno 21] Is a directory Change-Id: I2e2c13f712ec194acc9c61cf42aa8f639becb2f4
This commit is contained in:
parent
2cdf3b1526
commit
ab2189b556
|
@ -105,6 +105,8 @@ def setup_logging(config=None):
|
|||
os.makedirs(config['ARA_LOG_DIR'], mode=0o750)
|
||||
|
||||
if not os.path.exists(config['ARA_LOG_CONFIG']):
|
||||
if not config.get('ARA_LOG_FILE'):
|
||||
config['ARA_LOG_FILE'] = 'ara.log'
|
||||
default_config = DEFAULT_LOG_CONFIG.format(
|
||||
dir=config['ARA_LOG_DIR'],
|
||||
file=config['ARA_LOG_FILE'],
|
||||
|
|
Loading…
Reference in New Issue