summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-09-09 00:36:01 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-09-09 00:36:01 (GMT)
commiteb30843ea40d56798840a8129d2eae77558761c5 (patch)
tree7472b37bc57f3d9b84ac39f302187dc7080ac70c /Mac
parenta48d4eaddf282f1dda54a2b83d98710394063a3d (diff)
downloadcpython-eb30843ea40d56798840a8129d2eae77558761c5.zip
cpython-eb30843ea40d56798840a8129d2eae77558761c5.tar.gz
cpython-eb30843ea40d56798840a8129d2eae77558761c5.tar.bz2
Don't call MacOS.SchedParams() in MachO, it doesn't exist.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/EasyDialogs.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 277d6d0..fa980cc 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -418,7 +418,8 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
d.GetDialogWindow().ShowWindow()
d.DrawDialog()
- appsw = MacOS.SchedParams(1, 0)
+ if hasattr(MacOS, 'SchedParams'):
+ appsw = MacOS.SchedParams(1, 0)
try:
while 1:
stringstoadd = []
@@ -522,7 +523,8 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
newlist.append(item)
return newlist
finally:
- apply(MacOS.SchedParams, appsw)
+ if hasattr(MacOS, 'SchedParams'):
+ apply(MacOS.SchedParams, appsw)
del d
def test():
@@ -550,7 +552,8 @@ def test():
"So far, so good!", "Keep on truckin'" )
bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
try:
- appsw = MacOS.SchedParams(1, 0)
+ if hasattr(MacOS, 'SchedParams'):
+ appsw = MacOS.SchedParams(1, 0)
for i in xrange(20):
bar.inc()
time.sleep(0.05)
@@ -564,7 +567,8 @@ def test():
time.sleep(1.0) # give'em a chance to see "Done."
finally:
del bar
- apply(MacOS.SchedParams, appsw)
+ if hasattr(MacOS, 'SchedParams'):
+ apply(MacOS.SchedParams, appsw)
if __name__ == '__main__':
try: