Skip to content

Commit 8da2dba

Browse files
committed
test config
1 parent fc5d228 commit 8da2dba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test_config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ def test_nginx_config():
152152
f"you didn't set a SERVER_NAME in {file_path}"
153153

154154
for line in env_variables.split('\n'):
155-
variable_name = line.split('=')[0]
156-
variable_value = line.split('=')[1].strip('"')
157-
if variable_name == 'SERVER_NAME':
158-
server_name = variable_value
155+
if len(line) > 0:
156+
variable_name = line.split('=')[0]
157+
variable_value = line.split('=')[1].strip('"')
158+
if variable_name == 'SERVER_NAME':
159+
server_name = variable_value
159160

160161
file_path = 'nginx/nginx.conf'
161162
assert os.path.isfile(file_path), \

0 commit comments

Comments
 (0)