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

Delete only contents, but not the output folder itself #62

Open
KMax opened this issue Sep 18, 2017 · 0 comments
Open

Delete only contents, but not the output folder itself #62

KMax opened this issue Sep 18, 2017 · 0 comments

Comments

@KMax
Copy link

KMax commented Sep 18, 2017

It'd be easier to integrate ontodocs with Docker if it'd not try to delete the output directory attached as a volume. Ontodocs should delete only the contents of the output folder, but not the folder itself.

ontodocs_1  | Traceback (most recent call last):
ontodocs_1  |   File "/usr/bin/ontodocs", line 11, in <module>
ontodocs_1  |     sys.exit(main_cli())
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
ontodocs_1  |     return self.main(*args, **kwargs)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
ontodocs_1  |     rv = self.invoke(ctx)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
ontodocs_1  |     return ctx.invoke(self.callback, **ctx.params)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
ontodocs_1  |     return callback(*args, **kwargs)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/ontodocs/main.py", line 94, in main_cli
ontodocs_1  |     url = action_visualize(source, fromshell=False, path=outputpath, title=title, theme=theme, verbose=verbose)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/ontodocs/core/builder.py", line 184, in action_visualize
ontodocs_1  |     url  = build_visualization(ontouri, g, viztype, path, title, theme)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/ontodocs/core/builder.py", line 226, in build_visualization
ontodocs_1  |     url = v.build(path)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/ontodocs/core/viz_factory.py", line 92, in build
ontodocs_1  |     self.output_path = self.checkOutputPath(output_path)
ontodocs_1  |   File "/usr/lib/python2.7/site-packages/ontodocs/core/viz_factory.py", line 221, in checkOutputPath
ontodocs_1  |     shutil.rmtree(output_path)
ontodocs_1  |   File "/usr/lib64/python2.7/shutil.py", line 256, in rmtree
ontodocs_1  |     onerror(os.rmdir, path, sys.exc_info())
ontodocs_1  |   File "/usr/lib64/python2.7/shutil.py", line 254, in rmtree
ontodocs_1  |     os.rmdir(path)
ontodocs_1  | OSError: [Errno 16] Device or resource busy: './docs'
@lambdamusic lambdamusic transferred this issue from lambdamusic/Ontodocs Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants