mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-11 17:00:35 +08:00
add log warning
This commit is contained in:
parent
cb1999c648
commit
d918f793d2
1 changed files with 2 additions and 1 deletions
|
|
@ -314,7 +314,8 @@ def move_files(src, dest, mod=False):
|
||||||
modTime = time.time()
|
modTime = time.time()
|
||||||
os.utime(src, (modTime, modTime))
|
os.utime(src, (modTime, modTime))
|
||||||
shutil.move(src, dest)
|
shutil.move(src, dest)
|
||||||
except PermissionError:
|
except PermissionError as p:
|
||||||
|
logger.warning(f"{p} : Copying files instead.")
|
||||||
shutil.copyfile(src, dest)
|
shutil.copyfile(src, dest)
|
||||||
toDelete = True
|
toDelete = True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue