[ALL] Fix for Gearman SSL file check
Although options may not be defined in the config file, the keys are still present in the CONF structure, but with None values. We need to take that into consideration. Change-Id: Id1915a55db3ae4f70895c9f94876e318743dcd19
This commit is contained in:
@@ -82,6 +82,8 @@ def check_gearman_ssl_files():
|
|||||||
for key in ['ssl_ca', 'ssl_cert', 'ssl_key']:
|
for key in ['ssl_ca', 'ssl_cert', 'ssl_key']:
|
||||||
if key in CONF['gearman']:
|
if key in CONF['gearman']:
|
||||||
fname = CONF['gearman'][key]
|
fname = CONF['gearman'][key]
|
||||||
|
if fname is None:
|
||||||
|
continue
|
||||||
if not os.path.exists(fname):
|
if not os.path.exists(fname):
|
||||||
raise Exception("Gearman SSL file %s does not exist" % fname)
|
raise Exception("Gearman SSL file %s does not exist" % fname)
|
||||||
if not os.access(fname, os.R_OK):
|
if not os.access(fname, os.R_OK):
|
||||||
|
|||||||
Reference in New Issue
Block a user