1
This commit is contained in:
1 parent
123d934599
commit
80a3e79724
1 file changed
+2
-2
@@ -89,7 +89,7 @@ def checkDownloadFile(pid):
|
||||
mtlfilePath = os.path.join(config.workdir, "print", pid,f"{pid}.mtl")
|
||||
objfilePath = os.path.join(config.workdir, "print", pid,f"{pid}.obj")
|
||||
#读取该笔文件的mtl文件
|
||||
with open(mtlfilePath, 'r') as file:
|
||||
with open(mtlfilePath, 'r',encoding='utf-8') as file:
|
||||
mtlContent = file.read()
|
||||
#检测mtl文件是否正常
|
||||
if mtlContent == "":
|
||||
@@ -108,7 +108,7 @@ def checkDownloadFile(pid):
|
||||
|
||||
#检测obj文件 里 是否包含 o {pid},
|
||||
isContain = False
|
||||
with open(objfilePath, 'r') as file:
|
||||
with open(objfilePath, 'r',encoding='utf-8') as file:
|
||||
for line in file:
|
||||
if line.startswith(f'o {pid}'):
|
||||
isContain = True
|
||||
|
||||
Reference in new issue
Block a user