diff options
| author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-05-25 16:28:29 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2023-05-29 22:32:28 +0000 |
| commit | d308136a5e51f3dd2cef7253b184b8b348ff924f (patch) | |
| tree | 38e72723ff84d6bd0a4c6922b3dbdb279ef80289 /python/samba | |
| parent | 2009166efd40f39cc29a7cf0a3cf97d73df6678d (diff) | |
| download | samba-d308136a5e51f3dd2cef7253b184b8b348ff924f.tar.gz samba-d308136a5e51f3dd2cef7253b184b8b348ff924f.tar.bz2 samba-d308136a5e51f3dd2cef7253b184b8b348ff924f.zip | |
python:tests: Initialize global variable
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba')
| -rw-r--r-- | python/samba/tests/source_chars.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/tests/source_chars.py b/python/samba/tests/source_chars.py index 3f306f12f9a..a5e9fc2fb14 100644 --- a/python/samba/tests/source_chars.py +++ b/python/samba/tests/source_chars.py @@ -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) |
