mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:28:58 +08:00
Fix is_dir for Python 3.5
This commit is contained in:
parent
b62b682570
commit
80d7dc18cb
@ -341,7 +341,8 @@ class CuraPackageManager(QObject):
|
|||||||
try:
|
try:
|
||||||
# Go through all the files and use the first successful read as the result
|
# Go through all the files and use the first successful read as the result
|
||||||
for file_info in archive.infolist():
|
for file_info in archive.infolist():
|
||||||
if file_info.is_dir() or not file_info.filename.startswith("files/"):
|
is_dir = lambda file_info: file_info.filename.endswith('/')
|
||||||
|
if is_dir or not file_info.filename.startswith("files/"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
filename_parts = os.path.basename(file_info.filename.lower()).split(".")
|
filename_parts = os.path.basename(file_info.filename.lower()).split(".")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user