Ticket #657 (closed defect: fixed)
prune attribute unable to remove directories
| Reported by: | Torsten Rehn <torsten.rehn@…> | Owned by: | desai |
|---|---|---|---|
| Priority: | trivial | Milestone: | POSIX unification |
| Component: | bcfg2-client | Version: | 1.0 |
| Keywords: | Cc: |
Description
When using the prune attribute of Directory, it may try to os.unlink a directory (see http://trac.mcs.anl.gov/projects/bcfg2/browser/trunk/bcfg2/src/lib/Client/Tools/POSIX.py#L284) and fails. The attached patch shows a more informative message that tells the user to check the dir manually.
An alternative would be to just use shutil.rmtree instead.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.