summaryrefslogtreecommitdiffstats
path: root/Demo/pdist/FSProxy.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:11:21 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:11:21 (GMT)
commit94f25283c9b6cb43791e23618b9bec0cc961a7cb (patch)
treec32622183a1e7020de5afb458288be48449a60a6 /Demo/pdist/FSProxy.py
parenta045f191b4670bbf201d6d56a50886694c26da3e (diff)
downloadcpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.zip
cpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.tar.gz
cpython-94f25283c9b6cb43791e23618b9bec0cc961a7cb.tar.bz2
Remove traces of MacOS9 support.
Fix for issue #7908
Diffstat (limited to 'Demo/pdist/FSProxy.py')
-rw-r--r--Demo/pdist/FSProxy.py31
1 files changed, 5 insertions, 26 deletions
diff --git a/Demo/pdist/FSProxy.py b/Demo/pdist/FSProxy.py
index 510ac76..47fa8f9 100644
--- a/Demo/pdist/FSProxy.py
+++ b/Demo/pdist/FSProxy.py
@@ -23,12 +23,7 @@ from stat import *
import time
import fnmatch
-if os.name == 'mac':
- import macfs
- maxnamelen = 31
-else:
- macfs = None
- maxnamelen = 255
+maxnamelen = 255
skipnames = (os.curdir, os.pardir)
@@ -63,16 +58,10 @@ class FSProxyLocal:
return ignore
def _hidden(self, name):
- if os.name == 'mac':
- return name[0] == '(' and name[-1] == ')'
- else:
- return name[0] == '.'
+ return name[0] == '.'
def _hide(self, name):
- if os.name == 'mac':
- return '(%s)' % name
- else:
- return '.%s' % name
+ return '.%s' % name
def visible(self, name):
if len(name) > maxnamelen: return 0
@@ -81,18 +70,8 @@ class FSProxyLocal:
if self._hidden(name): return 0
head, tail = os.path.split(name)
if head or not tail: return 0
- if macfs:
- if os.path.exists(name) and not os.path.isdir(name):
- try:
- fs = macfs.FSSpec(name)
- c, t = fs.GetCreatorType()
- if t != 'TEXT': return 0
- except macfs.error as msg:
- print("***", name, msg)
- return 0
- else:
- if os.path.islink(name): return 0
- if '\0' in open(name, 'rb').read(512): return 0
+ if os.path.islink(name): return 0
+ if '\0' in open(name, 'rb').read(512): return 0
for ign in self._ignore:
if fnmatch.fnmatch(name, ign): return 0
return 1