mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
shutil.SameFileError exception is not available on centos, using private function from shutil which does the same with condition
This commit is contained in:
parent
62b6ac19b6
commit
ff8698bfcb
1 changed files with 5 additions and 5 deletions
|
|
@ -615,12 +615,12 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
|
||||
# copy file with speedcopy and check if size of files are simetrical
|
||||
while True:
|
||||
import shutil
|
||||
try:
|
||||
if not shutil._samefile(src, dst):
|
||||
copyfile(src, dst)
|
||||
except shutil.SameFileError:
|
||||
self.log.critical("files are the same {} to {}".format(src,
|
||||
dst))
|
||||
else:
|
||||
self.log.critical(
|
||||
"files are the same {} to {}".format(src, dst)
|
||||
)
|
||||
os.remove(dst)
|
||||
try:
|
||||
shutil.copyfile(src, dst)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue