forked from bartvdbraak/blender
Use for/else instead of setting 'ok' variable.
This is more efficient, and this use case is exactly what the else clause is for.
This commit is contained in:
parent
9af3119c53
commit
c9291ab2ac
@ -211,11 +211,10 @@ def load_modules():
|
|||||||
[(os.sep + f + ".py") for f in BLACKLIST])
|
[(os.sep + f + ".py") for f in BLACKLIST])
|
||||||
|
|
||||||
for f in source_files:
|
for f in source_files:
|
||||||
ok = False
|
|
||||||
for ignore in ignore_paths:
|
for ignore in ignore_paths:
|
||||||
if ignore in f:
|
if ignore in f:
|
||||||
ok = True
|
break
|
||||||
if not ok:
|
else:
|
||||||
raise Exception("Source file %r not loaded in test" % f)
|
raise Exception("Source file %r not loaded in test" % f)
|
||||||
|
|
||||||
print("loaded %d modules" % len(loaded_files))
|
print("loaded %d modules" % len(loaded_files))
|
||||||
|
Loading…
Reference in New Issue
Block a user