Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete template file because it's not closed #311

Open
patmcgoldrickni opened this issue Jun 9, 2021 · 0 comments
Open

Unable to delete template file because it's not closed #311

patmcgoldrickni opened this issue Jun 9, 2021 · 0 comments

Comments

@patmcgoldrickni
Copy link

Runing this on windows.
Doing an update of the template files.
Was unable to delete tempdir because it was not closed.
Adding close call, fixed the issue.
In file ibmsecurity-master\ibmsecurity\isam\aac\runtime_template\root.py

Added close call on line 76, before call to shutil.rmtree(tempdir)
root.zip

def import_file(isamAppliance, filename, delete_missing=False, check_mode=False, force=False):
  .....
                else:
                    search_dir= os.path.dirname(x) + '/'
                    if search_dir not in missing_client_files:
                        logger.debug("delete file on the server: {0}.".format(x))
                        delete(isamAppliance, x, "file", check_mode=check_mode)
            zServerFile.close()
            shutil.rmtree(tempdir)
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

No branches or pull requests

1 participant