Replace 'c = a if a else b' with 'c = a or b'

Change-Id: I66ed9cf8007243e2464837094a90b39449249e6a
This commit is contained in:
Yang Li 2016-07-28 21:38:55 +08:00
parent 53834349fb
commit 4695d053ed
1 changed files with 3 additions and 4 deletions

View File

@ -74,10 +74,9 @@ class JinjaTemplater(object):
:param timeout_connect: Timeout connect
"""
self.base_amp_path = base_amp_path if base_amp_path else BASE_PATH
self.base_crt_dir = base_crt_dir if base_crt_dir else BASE_CRT_DIR
self.haproxy_template = (haproxy_template if haproxy_template
else HAPROXY_TEMPLATE)
self.base_amp_path = base_amp_path or BASE_PATH
self.base_crt_dir = base_crt_dir or BASE_CRT_DIR
self.haproxy_template = haproxy_template or HAPROXY_TEMPLATE
self.log_http = log_http
self.log_server = log_server
self.timeout_client = timeout_client