From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BE6C31382C5 for ; Fri, 11 Jun 2021 03:30:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58E0EE0896; Fri, 11 Jun 2021 03:30:34 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17825E088C for ; Fri, 11 Jun 2021 03:30:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 47A8F33E6A3 for ; Fri, 11 Jun 2021 03:30:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F5B1797 for ; Fri, 11 Jun 2021 03:30:29 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1623213128.fbe56d75989fabf29e7b642515df69737cf62cc1.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/fileops.py X-VCS-Directories: catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: fbe56d75989fabf29e7b642515df69737cf62cc1 X-VCS-Branch: master Date: Fri, 11 Jun 2021 03:30:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 54e03599-b5e4-4280-937b-c52c07880c1b X-Archives-Hash: eff31c8da7b88cd4430efa07ea29dc4b commit: fbe56d75989fabf29e7b642515df69737cf62cc1 Author: Matt Turner gentoo org> AuthorDate: Wed Jun 9 04:32:08 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Jun 9 04:32:08 2021 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fbe56d75 catalyst: Remove clear_dir's never used clear_nondir parameter Signed-off-by: Matt Turner gentoo.org> catalyst/fileops.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/catalyst/fileops.py b/catalyst/fileops.py index 59525420..4252285e 100644 --- a/catalyst/fileops.py +++ b/catalyst/fileops.py @@ -46,8 +46,7 @@ def ensure_dirs(path, gid=-1, uid=-1, mode=0o755, minimal=True, return succeeded -def clear_dir(target, mode=0o755, remove=False, - clear_nondir=True): +def clear_dir(target, mode=0o755, remove=False): '''Universal directory clearing function @target: string, path to be cleared or removed @@ -74,12 +73,8 @@ def clear_dir(target, mode=0o755, remove=False, log.error('clear_dir failed', exc_info=True) return False elif os.path.exists(target): - if clear_nondir: - log.debug("Clearing (unlinking) non-directory: %s", target) - os.unlink(target) - else: - log.info('clear_dir failed: %s: is not a directory', target) - return False + log.debug("Clearing (unlinking) non-directory: %s", target) + os.unlink(target) else: log.debug("Conditions not met to clear: %s", target) log.debug(" isdir: %s", os.path.isdir(target)) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5BEB1382C5 for ; Thu, 10 Jun 2021 00:48:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D14EE0907; Thu, 10 Jun 2021 00:48:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5E9DDE0907 for ; Thu, 10 Jun 2021 00:48:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 48AAA340C40 for ; Thu, 10 Jun 2021 00:48:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AF3337B2 for ; Thu, 10 Jun 2021 00:48:43 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1623213128.fbe56d75989fabf29e7b642515df69737cf62cc1.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/fileops.py X-VCS-Directories: catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: fbe56d75989fabf29e7b642515df69737cf62cc1 X-VCS-Branch: wip/mattst88 Date: Thu, 10 Jun 2021 00:48:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d59470da-3b45-47c3-b23c-28ab3d9fef7d X-Archives-Hash: 3871b176482e26a067254b1f12b8eb23 Message-ID: <20210610004843.YExWsxd2J2a_I2JozGwhc4II8eDHUJEvwZ85VkpZ7WY@z> commit: fbe56d75989fabf29e7b642515df69737cf62cc1 Author: Matt Turner gentoo org> AuthorDate: Wed Jun 9 04:32:08 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Jun 9 04:32:08 2021 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fbe56d75 catalyst: Remove clear_dir's never used clear_nondir parameter Signed-off-by: Matt Turner gentoo.org> catalyst/fileops.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/catalyst/fileops.py b/catalyst/fileops.py index 59525420..4252285e 100644 --- a/catalyst/fileops.py +++ b/catalyst/fileops.py @@ -46,8 +46,7 @@ def ensure_dirs(path, gid=-1, uid=-1, mode=0o755, minimal=True, return succeeded -def clear_dir(target, mode=0o755, remove=False, - clear_nondir=True): +def clear_dir(target, mode=0o755, remove=False): '''Universal directory clearing function @target: string, path to be cleared or removed @@ -74,12 +73,8 @@ def clear_dir(target, mode=0o755, remove=False, log.error('clear_dir failed', exc_info=True) return False elif os.path.exists(target): - if clear_nondir: - log.debug("Clearing (unlinking) non-directory: %s", target) - os.unlink(target) - else: - log.info('clear_dir failed: %s: is not a directory', target) - return False + log.debug("Clearing (unlinking) non-directory: %s", target) + os.unlink(target) else: log.debug("Conditions not met to clear: %s", target) log.debug(" isdir: %s", os.path.isdir(target))