summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 (GMT)
commit9545a23c7ffb35417d451d24cc3b0339627965a7 (patch)
tree5e22fd30c1c6936970b4d87ca3e91f8428c74983 /Demo
parenta8157183b89c08cf47c969185d40973ec21a81c5 (diff)
downloadcpython-9545a23c7ffb35417d451d24cc3b0339627965a7.zip
cpython-9545a23c7ffb35417d451d24cc3b0339627965a7.tar.gz
cpython-9545a23c7ffb35417d451d24cc3b0339627965a7.tar.bz2
In a number of places code still revers
to "sys.platform == 'mac'" and that is dead code because it refers to a platform that is no longer supported (and hasn't been supported for several releases). Fixes issue #7908 for the trunk.
Diffstat (limited to 'Demo')
-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 a1ab635..871c84f 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, 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