1111
This commit is contained in:
1 parent
d944502849
commit
4549c06846
4 files changed
+7
-3
No files matched your search
@@ -55,3 +55,4 @@ echo.
|
|||||||
echo ========================================
|
echo ========================================
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
|
||||||
@@ -148,3 +148,4 @@ if __name__ == '__main__':
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@@ -3,3 +3,4 @@ oss2>=2.17.0
|
|||||||
requests>=2.28.0
|
requests>=2.28.0
|
||||||
pyinstaller>=5.0.0
|
pyinstaller>=5.0.0
|
||||||
|
|
||||||
|
|
||||||
@@ -226,6 +226,9 @@ def downloadJsonAndJpgFileAndMoveToCorrectDir(versionId, currentDir):
|
|||||||
#如果是大机台,将 json 文件复制到 data 目录下
|
#如果是大机台,将 json 文件复制到 data 目录下
|
||||||
if str(machineInfo["machine_type"]) != '1':
|
if str(machineInfo["machine_type"]) != '1':
|
||||||
shutil.copy(os.path.join(jsonSubDir, '3DPrintLayout.json'), os.path.join(dataSubDir, '3DPrintLayout.json'))
|
shutil.copy(os.path.join(jsonSubDir, '3DPrintLayout.json'), os.path.join(dataSubDir, '3DPrintLayout.json'))
|
||||||
|
if not os.path.exists(os.path.join(dataSubDir, '3DPrintLayout.json')):
|
||||||
|
log(f"JSON文件不存在, dataSubDir={dataSubDir}")
|
||||||
|
return False, False
|
||||||
|
|
||||||
|
|
||||||
# 检测文件是否移动成功
|
# 检测文件是否移动成功
|
||||||
@@ -235,9 +238,7 @@ def downloadJsonAndJpgFileAndMoveToCorrectDir(versionId, currentDir):
|
|||||||
if not os.path.exists(os.path.join(jsonSubDir, f'{versionId}.jpg')):
|
if not os.path.exists(os.path.join(jsonSubDir, f'{versionId}.jpg')):
|
||||||
log(f"JPG文件不存在, versionId={versionId}")
|
log(f"JPG文件不存在, versionId={versionId}")
|
||||||
return False, False
|
return False, False
|
||||||
if not os.path.exists(os.path.join(dataSubDir, '3DPrintLayout.json')):
|
|
||||||
log(f"JSON文件不存在, dataSubDir={dataSubDir}")
|
|
||||||
return False, False
|
|
||||||
log(f"文件移动成功, versionId={versionId}")
|
log(f"文件移动成功, versionId={versionId}")
|
||||||
# 返回目录路径
|
# 返回目录路径
|
||||||
return dirNewName, machineInfo
|
return dirNewName, machineInfo
|
||||||
|
|||||||
Reference in new issue
Block a user