Skip to content

safely delete shp file#694

Open
pawangramvaani wants to merge 1 commit intomainfrom
hotfix/delete_shp
Open

safely delete shp file#694
pawangramvaani wants to merge 1 commit intomainfrom
hotfix/delete_shp

Conversation

@pawangramvaani
Copy link
Collaborator

Instead of using rmtree to delete the folder use, first delete the file then using os.remove delete folder only for nrega and admin boundary.

path = os.path.join(*path)
if (os.path.isdir(path)) and (
path.startswith("data/admin-boundary/output")
or path.startswith("data/nrega_assets/output")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned earlier, this function is used in all pipelines, and not just NREGA and admin_boundary. Please carefully check the code flow again and make the changes accordingly. NO HARD-CODED PATHS PLEASE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants