From e58837358374d2320acc7c247db9b9b337eebdf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu>
Date: Fri, 6 Oct 2017 11:52:29 +0200
Subject: [PATCH] Fixed warnings type in nginx vhost test.

---
 tests/test_nginx_vhosts.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/test_nginx_vhosts.py b/tests/test_nginx_vhosts.py
index cfef9d8d..bc759981 100755
--- a/tests/test_nginx_vhosts.py
+++ b/tests/test_nginx_vhosts.py
@@ -49,7 +49,7 @@ if os.path.exists('/etc/celerity/config.py'):
 resolution_ignored = conf.get('TESTER_VHOST_RESOLUTION_IGNORED', '').split(',')
 found = False
 errors = 0
-warnings = False
+warnings = 0
 for name in os.listdir(nginx_dir):
     path = os.path.join(nginx_dir, name)
     with open(path, 'r') as fo:
@@ -71,7 +71,7 @@ for name in os.listdir(nginx_dir):
         sys.stdout.write('Testing url "%s":\n' % url)
         if name.startswith('mediaserver') and url not in celerity_conf:
             sys.stdout.write('Url "%s" not found in celerity conf; it should also be set in the MediaWorker.\n' % url)
-            warnings = True
+            warnings += 1
         # test domain IP
         ip_error = None
         ip_warning = None
@@ -128,7 +128,7 @@ for name in os.listdir(nginx_dir):
         sys.stdout.write('.\n')
 
         if ip_warning:
-            warnings +=1
+            warnings += 1
 
         if ip_error or req_error:
             errors += 1
-- 
GitLab