Skip to content

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

@patmcgoldrickni

Description

@patmcgoldrickni

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions