Skip to content

Instantly share code, notes, and snippets.

@pykong
Last active November 21, 2017 21:41
Show Gist options
  • Save pykong/cbe88725a2b7039ecc3beb976613a1f1 to your computer and use it in GitHub Desktop.
Save pykong/cbe88725a2b7039ecc3beb976613a1f1 to your computer and use it in GitHub Desktop.
Also works when dir does not exist, so there is no need for LBYL.
import shutil
shutil.rmtree(role_fs_path, ignore_errors=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment