Update osxphotos/utils.py

Co-authored-by: Rhet Turnbull <rturnbull@gmail.com>
This commit is contained in:
britiscurious
2020-05-08 22:56:12 +02:00
committed by GitHub
parent 69356c0b57
commit cceab62993

View File

@@ -133,7 +133,7 @@ def _hardlink_file(src, dest):
# if error on copy, subprocess will raise CalledProcessError
try:
result = subprocess.run(command, check=True, stderr=subprocess.PIPE)
os.link(src, dest)
except subprocess.CalledProcessError as e:
logging.critical(
f"ln returned error: {e.returncode} {e.stderr.decode(sys.getfilesystemencoding()).rstrip()}"