Modify ↓
Ticket #657 (closed defect: fixed)
prune attribute unable to remove directories
Reported by: | Torsten Rehn <[email protected]…> | 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
Changed 14 years ago by Torsten Rehn <[email protected]…>
- Attachment bcfg2-dir-unlink.diff added
comment:1 Changed 14 years ago by solj
- Milestone changed from Bcfg2 1.0 Release to POSIX unification
comment:2 Changed 14 years ago by desai
- Status changed from new to closed
- Resolution set to fixed
Committed in [4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a] (SVN r5277) Thanks for the patch.
Note: See
TracTickets for help on using
tickets.
patch for more graceful dir unlink failure