22
This commit is contained in:
1 parent
80a3e79724
commit
0bac162361
1 file changed
+3
-3
@@ -88,8 +88,8 @@ def down_obj_from_oss(workdir, pid, action):
|
||||
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',encoding='utf-8') as file:
|
||||
#读取该笔文件的mtl文件 忽略编码问题
|
||||
with open(mtlfilePath, 'r',encoding='utf-8',errors='ignore') as file:
|
||||
mtlContent = file.read()
|
||||
#检测mtl文件是否正常
|
||||
if mtlContent == "":
|
||||
@@ -108,7 +108,7 @@ def checkDownloadFile(pid):
|
||||
|
||||
#检测obj文件 里 是否包含 o {pid},
|
||||
isContain = False
|
||||
with open(objfilePath, 'r',encoding='utf-8') as file:
|
||||
with open(objfilePath, 'r',encoding='utf-8',errors='ignore') as file:
|
||||
for line in file:
|
||||
if line.startswith(f'o {pid}'):
|
||||
isContain = True
|
||||
|
||||
Reference in new issue
Block a user