From 3004cad75da1af98f50c9f457bc43fc3aeda1a7a Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 12 Jan 2010 16:56:39 +0100 Subject: New fail-logic on removal of an overlay --- CHANGES | 3 +++ layman/overlays/overlay.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index df394b4..73d8cd9 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,9 @@ Version TODO - Drop support for broken tar overlays with missing category level (and missing profiles/repo_name as a consequence) + - Make missing overlay directory not fail removal of that overlay + from the local list + Version 1.2.5 - Released 2010/01/04 =================================== diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index e613ec2..64ef419 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -217,8 +217,8 @@ class Overlay(object): mdir = path([base, self.name]) if not os.path.exists(mdir): - raise Exception('Directory ' + mdir + ' does not exist. Cannot remo' - 've the overlay!') + OUT.warn('Directory ' + mdir + ' did not exist, no files deleted.') + return shutil.rmtree(mdir) -- cgit v1.2.3-65-gdbad