Skip to content

Commit 82a8cec

Browse files
chmreidhannes-ucsc
andcommitted
Update hca/dss/util/__init__.py
Co-Authored-By: Hannes Schmidt <hannes@ucsc.edu>
1 parent 44386ef commit 82a8cec

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

hca/dss/util/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ def hardlink(source, link_name):
5858
if source_stat.st_dev != dest_stat.st_dev or source_stat.st_ino != dest_stat.st_ino:
5959
raise
6060
except OSError as e:
61-
# ELINK can occur when max number of links has been reached
62-
# EPERM can occur when writing to NFS
63-
copy_on_error = (errno.EMLINK, errno.EPERM)
61+
copy_on_error = (
62+
errno.EMLINK, # max. number of hard links exceeded
63+
errno.EPERM, # observed on NFS mounts (issue #519)
64+
)
6465
if e.errno in copy_on_error:
6566
# FIXME: Copying is not space efficient; see https://github.com/HumanCellAtlas/dcp-cli/issues/453
6667
log.warning('Failed to link source `%s` to destination `%s`; reverting to copying', source, link_name)

0 commit comments

Comments
 (0)