summaryrefslogtreecommitdiff
path: root/Demo
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 +0000
committerRonald Oussoren <ronaldoussoren@mac.com>2010-05-05 19:09:31 +0000
commita8ed20854e0c1c7dde11f68451478f18fcb7fc68 (patch)
tree141ead30170143eb0fbba5402eccb851534bb71d /Demo
parentc40d7af57d94f0a7e7e4a2a380ec3d5d86773b55 (diff)
downloadcpython-a8ed20854e0c1c7dde11f68451478f18fcb7fc68.tar.gz
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 a1ab635c08..871c84f9c7 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