changeset 19814:dc87d91d0dfd legacy-trunk

Don't call MacOS.SchedParams() in MachO, it doesn't exist.
author Jack Jansen <jack.jansen@cwi.nl>
date Sun, 09 Sep 2001 00:36:01 +0000
parents 70411eba225b
children 8d585d822f9d
files Mac/Lib/EasyDialogs.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Mac/Lib/EasyDialogs.py	Sun Sep 09 00:35:19 2001 +0000
+++ b/Mac/Lib/EasyDialogs.py	Sun Sep 09 00:36:01 2001 +0000
@@ -418,7 +418,8 @@
 	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 @@
 			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 @@
 			"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 @@
 		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: