Don't call MacOS.SchedParams() in MachO, it doesn't exist.

This commit is contained in:
Jack Jansen 2001-09-09 00:36:01 +00:00
parent a48d4eaddf
commit eb30843ea4

View file

@ -418,6 +418,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
d.SetDialogCancelItem(ARGV_ITEM_CANCEL) d.SetDialogCancelItem(ARGV_ITEM_CANCEL)
d.GetDialogWindow().ShowWindow() d.GetDialogWindow().ShowWindow()
d.DrawDialog() d.DrawDialog()
if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0) appsw = MacOS.SchedParams(1, 0)
try: try:
while 1: while 1:
@ -522,6 +523,7 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
newlist.append(item) newlist.append(item)
return newlist return newlist
finally: finally:
if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw) apply(MacOS.SchedParams, appsw)
del d del d
@ -550,6 +552,7 @@ def test():
"So far, so good!", "Keep on truckin'" ) "So far, so good!", "Keep on truckin'" )
bar = ProgressBar("Progress, progress...", 0, label="Ramping up...") bar = ProgressBar("Progress, progress...", 0, label="Ramping up...")
try: try:
if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0) appsw = MacOS.SchedParams(1, 0)
for i in xrange(20): for i in xrange(20):
bar.inc() bar.inc()
@ -564,6 +567,7 @@ def test():
time.sleep(1.0) # give'em a chance to see "Done." time.sleep(1.0) # give'em a chance to see "Done."
finally: finally:
del bar del bar
if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw) apply(MacOS.SchedParams, appsw)
if __name__ == '__main__': if __name__ == '__main__':