Skip to content

Commit 7f357b9

Browse files
committed
tensorflow: split up cleanup and creation of directory
The failure of the removal would prevent the subsequent directory creation. Split it up into two distinct steps.
1 parent e531493 commit 7f357b9

File tree

1 file changed

+3
-0
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+3
-0
lines changed

utils/swift_build_support/swift_build_support/products/tensorflow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ def install(self, host_target):
216216
try:
217217
shutil.rmtree(os.path.join(self.install_toolchain_path(),
218218
'usr', 'lib', 'swift', 'tensorflow'))
219+
except OSError:
220+
pass
221+
try:
219222
os.makedirs(os.path.join(self.install_toolchain_path(),
220223
'usr', 'lib', 'swift', 'tensorflow', 'c',
221224
'eager'))

0 commit comments

Comments
 (0)