🔨 Simplify scripts with pathlib (#24574)

This commit is contained in:
Scott Lahteine
2022-08-01 01:14:58 -05:00
parent c3f2586445
commit 3b30951e83
14 changed files with 182 additions and 196 deletions

View File

@ -144,7 +144,7 @@ class DWIN_ICO_File():
# process each file:
try:
index = int(dirEntry.name[0:3])
if (index < 0) or (index > 255):
if not (0 <= index <= 255):
print('...Ignoring invalid index on', dirEntry.path)
continue
#dirEntry.path is iconDir/name