MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / symlink_force

Function symlink_force

configure.py:105–119  ·  view source on GitHub ↗

Force symlink, equivalent of 'ln -sf'. Args: target: items to link to. link_name: name of the link.

(target, link_name)

Source from the content-addressed store, hash-verified

103
104
105def symlink_force(target, link_name):
106 """Force symlink, equivalent of 'ln -sf'.
107
108 Args:
109 target: items to link to.
110 link_name: name of the link.
111 """
112 try:
113 os.symlink(target, link_name)
114 except OSError as e:
115 if e.errno == errno.EEXIST:
116 os.remove(link_name)
117 os.symlink(target, link_name)
118 else:
119 raise e
120
121
122def sed_in_place(filename, old, new):

Callers 2

set_other_mpi_varsFunction · 0.85
configure_iosFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected