mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove unused variable
This commit is contained in:
parent
ee71a051b6
commit
9f2cd89e15
1 changed files with 9 additions and 10 deletions
|
|
@ -91,18 +91,17 @@ class FileTransaction(object):
|
|||
|
||||
def process(self):
|
||||
# Backup any existing files
|
||||
for dst, (src, opts) in self._transfers.items():
|
||||
if dst == src:
|
||||
for dst, (src, _) in self._transfers.items():
|
||||
if dst == src or not os.path.exists(dst):
|
||||
continue
|
||||
|
||||
if os.path.exists(dst):
|
||||
# Backup original file
|
||||
# todo: add timestamp or uuid to ensure unique
|
||||
backup = dst + ".bak"
|
||||
self._backup_to_original[backup] = dst
|
||||
self.log.debug(
|
||||
"Backup existing file: {} -> {}".format(dst, backup))
|
||||
os.rename(dst, backup)
|
||||
# Backup original file
|
||||
# todo: add timestamp or uuid to ensure unique
|
||||
backup = dst + ".bak"
|
||||
self._backup_to_original[backup] = dst
|
||||
self.log.debug(
|
||||
"Backup existing file: {} -> {}".format(dst, backup))
|
||||
os.rename(dst, backup)
|
||||
|
||||
# Copy the files to transfer
|
||||
for dst, (src, opts) in self._transfers.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue