Skip to content

mech destroy has OSError after running vmrun deleteVM #57

Open
@dodo5522

Description

@dodo5522

mech destroy had OSError on my environment VMWare Fusion 11 with macOS High Sierra.
It seems that vmrun deleteVM has removed VM's instance path after vmrun deleteVM.

$ mech destroy
Are you sure you want to delete mechtest at /Users/takashi/Development/mechtest [y/N] y
Deleting...
Traceback (most recent call last):
  File "/usr/local/bin/mech", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/mech/__main__.py", line 39, in main
    return Mech(arguments)()
  File "/usr/local/lib/python2.7/site-packages/mech/command.py", line 89, in __call__
    obj = klass(arguments)
  File "/usr/local/lib/python2.7/site-packages/mech/mech.py", line 720, in destroy
    shutil.rmtree(mech_path)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 262, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 260, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/Users/takashi/Development/mechtest/.mech'

Activity

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

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