Modify

Ticket #657 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years 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 (676 bytes) - added by Torsten Rehn <torsten.rehn@…> 12 years ago.
patch for more graceful dir unlink failure

Change History

Changed 12 years ago by Torsten Rehn <torsten.rehn@…>

patch for more graceful dir unlink failure

comment:1 Changed 12 years ago by solj

  • Milestone changed from Bcfg2 1.0 Release to POSIX unification

comment:2 Changed 12 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

Committed in [4afa9bbe3d00ec997dd255d1d93e5ce5e13d5b2a] (SVN r5277) Thanks for the patch.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.