Ticket #657 (closed defect: fixed)

Opened 6 months ago

Last modified 5 months ago

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

bcfg2-dir-unlink.diff (0.7 KB) - added by Torsten Rehn <torsten.rehn@…> 6 months ago.
patch for more graceful dir unlink failure

Change History

Changed 6 months ago by Torsten Rehn <torsten.rehn@…>

patch for more graceful dir unlink failure

Changed 6 months ago by solj

  • milestone changed from Bcfg2 1.0 Release to POSIX unification

Changed 5 months ago by desai

  • status changed from new to closed
  • resolution set to fixed

Committed in [5277] Thanks for the patch.

Add/Change #657 (prune attribute unable to remove directories)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.