Skip to content

Instantly share code, notes, and snippets.

View pokulo's full-sized avatar

Heinrich Kießling pokulo

  • Scale GmbH
  • Dresden
View GitHub Profile
@pokulo
pokulo / gist:4a8056f58018a252d8e115dbb2995078
Last active December 6, 2024 12:21
shutil.rmtree may fail deleting folder inside NFS mount with: OSError: [Errno 39] Directory not empty:
import logging
import os
import psutil
import shutil
# inspired by https://stackoverflow.com/a/58943527/2894081 and https://github.com/iterative/dvc/issues/5641
directory = "/nfs-mount/some-random-working-directory/"
os.mkdir(directory)