From 56569f4e530c39075aee2d5b34580cfbc7ff603a Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Wed, 17 Mar 2010 17:52:41 +0100 Subject: [PATCH] backend: Two small style fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Pass keyword parameter as such - Replace βnot x == yβ with βx != yβ Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index 601a3f362..9b98a7675 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -2109,7 +2109,7 @@ def FinalizeExport(instance, snap_disks): utils.WriteFile(utils.PathJoin(destdir, constants.EXPORT_CONF_FILE), data=config.Dumps()) - shutil.rmtree(finaldestdir, True) + shutil.rmtree(finaldestdir, ignore_errors=True) shutil.move(destdir, finaldestdir) @@ -2273,7 +2273,7 @@ def _TransformFileStorageDir(file_storage_dir): cfg = _GetConfig() file_storage_dir = os.path.normpath(file_storage_dir) base_file_storage_dir = cfg.GetFileStorageDir() - if (not os.path.commonprefix([file_storage_dir, base_file_storage_dir]) == + if (os.path.commonprefix([file_storage_dir, base_file_storage_dir]) != base_file_storage_dir): _Fail("File storage directory '%s' is not under base file" " storage directory '%s'", file_storage_dir, base_file_storage_dir) -- GitLab