[Python-checkins] gh-98940: Fix Mac/Extras.install.py File filter bug (#98943)

ronaldoussoren webhook-mailer at python.org
Wed Nov 16 04:17:57 EST 2022


https://github.com/python/cpython/commit/ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c
commit: ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c
branch: main
author: zhangbo <zhangbo2012 at outlook.com>
committer: ronaldoussoren <ronaldoussoren at mac.com>
date: 2022-11-16T10:17:18+01:00
summary:

gh-98940: Fix Mac/Extras.install.py File filter bug (#98943)

Slightly simplify the script and fix a case issue in the name of ``.DS_Store`` files.

Co-authored-by: Nikita Sobolev <mail at sobolevn.me>

files:
A Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst
M Mac/Extras.install.py

diff --git a/Mac/Extras.install.py b/Mac/Extras.install.py
index ab1af71dfd82..41bfa53d6163 100644
--- a/Mac/Extras.install.py
+++ b/Mac/Extras.install.py
@@ -9,10 +9,9 @@
 debug = 0
 
 def isclean(name):
-    if name == 'CVS': return 0
-    if name == '.cvsignore': return 0
-    if name == '.DS_store': return 0
-    if name == '.svn': return 0
+    if name in ('CVS', '.cvsignore', '.svn'):
+        return 0
+    if name.lower() == '.ds_store': return 0
     if name.endswith('~'): return 0
     if name.endswith('.BAK'): return 0
     if name.endswith('.pyc'): return 0
diff --git a/Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst b/Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst
new file mode 100644
index 000000000000..18ef0b0e2523
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst
@@ -0,0 +1 @@
+Fix ``Mac/Extras.install.py`` file filter bug.



More information about the Python-checkins mailing list