1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00

python:tests: Initialize global variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton
2023-05-25 16:28:29 +12:00
committed by Andrew Bartlett
parent 2009166efd
commit d308136a5e

View File

@@ -276,6 +276,10 @@ class CharacterTests(TestCase):
def check_file_text():
"""If called directly as a script, count the found characters."""
global ROOT
if not ROOT:
ROOT = _find_root()
counts = Counter()
for name in iter_source_files():
fullname = os.path.join(ROOT, name)