mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[graph] use shutil to rename status file
* os.rename does not work on Windows if destination already exists
This commit is contained in:
parent
0485ce4738
commit
7e1a66663a
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import hashlib
|
|||
import json
|
||||
import os
|
||||
import psutil
|
||||
import shutil
|
||||
import subprocess
|
||||
import threading
|
||||
import time
|
||||
|
@ -332,7 +333,7 @@ class Node:
|
|||
statusFilepathWriting = statusFilepath + '.writing.' + str(uuid.uuid4())
|
||||
with open(statusFilepathWriting, 'w') as jsonFile:
|
||||
json.dump(data, jsonFile, indent=4)
|
||||
os.rename(statusFilepathWriting, statusFilepath)
|
||||
shutil.move(statusFilepathWriting, statusFilepath)
|
||||
|
||||
def upgradeStatusTo(self, newStatus):
|
||||
if int(newStatus.value) <= int(self.status.status.value):
|
||||
|
|
Loading…
Add table
Reference in a new issue