#661 Added exception handler to import code to remove build dir if failure
Closed by mikem. Opened by breilly.
breilly/koji straycg-584  into  master

Download 661.patch
no initial comment

The remainder of #584 was addressed in #649, so this is redundant.

Regardless here are some quick notes:

  • os.rmdir() only removes empty directories, and would generally fail here. We have an rmtree function on koji.util for recursively removing directories.
  • I see you've used raise e because the nested try..except overwrites the original exception. Unfortunately this replaces the call stack in the traceback. A better way is to move the nested try..except into a separate function and just use raise in the outer one.

Pull-Request has been closed by mikem

Metadata