Kaydet (Commit) eb30843e authored tarafından Jack Jansen's avatar Jack Jansen

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

üst a48d4ead
...@@ -418,7 +418,8 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo ...@@ -418,7 +418,8 @@ 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()
appsw = MacOS.SchedParams(1, 0) if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0)
try: try:
while 1: while 1:
stringstoadd = [] stringstoadd = []
...@@ -522,7 +523,8 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo ...@@ -522,7 +523,8 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
newlist.append(item) newlist.append(item)
return newlist return newlist
finally: finally:
apply(MacOS.SchedParams, appsw) if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw)
del d del d
def test(): def test():
...@@ -550,7 +552,8 @@ def test(): ...@@ -550,7 +552,8 @@ 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:
appsw = MacOS.SchedParams(1, 0) if hasattr(MacOS, 'SchedParams'):
appsw = MacOS.SchedParams(1, 0)
for i in xrange(20): for i in xrange(20):
bar.inc() bar.inc()
time.sleep(0.05) time.sleep(0.05)
...@@ -564,7 +567,8 @@ def test(): ...@@ -564,7 +567,8 @@ 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
apply(MacOS.SchedParams, appsw) if hasattr(MacOS, 'SchedParams'):
apply(MacOS.SchedParams, appsw)
if __name__ == '__main__': if __name__ == '__main__':
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment