summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2009-09-06 10:00:26 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2009-09-06 10:00:26 (GMT)
commit2596758cb42cb592f2e3c33ef77bc9b02c995510 (patch)
tree78f8869bfd6ec74755463b0f918d2e24d5972465 /Mac
parentf01697014f63e3fbe11f73afe789b6205125cb20 (diff)
downloadcpython-2596758cb42cb592f2e3c33ef77bc9b02c995510.zip
cpython-2596758cb42cb592f2e3c33ef77bc9b02c995510.tar.gz
cpython-2596758cb42cb592f2e3c33ef77bc9b02c995510.tar.bz2
Fix build issues on OSX 10.6 (issue 6802)
Diffstat (limited to 'Mac')
-rw-r--r--Mac/scripts/BuildApplet.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/Mac/scripts/BuildApplet.py b/Mac/scripts/BuildApplet.py
index e71ebc1..eeeb82b 100644
--- a/Mac/scripts/BuildApplet.py
+++ b/Mac/scripts/BuildApplet.py
@@ -12,7 +12,10 @@ sys.stdout = sys.stderr
import os
import MacOS
-import EasyDialogs
+try:
+ import EasyDialogs
+except ImportError:
+ EasyDialogs = None
import buildtools
import getopt
@@ -32,7 +35,10 @@ def main():
try:
buildapplet()
except buildtools.BuildError, detail:
- EasyDialogs.Message(detail)
+ if EasyDialogs is None:
+ print detail
+ else:
+ EasyDialogs.Message(detail)
def buildapplet():
@@ -46,6 +52,10 @@ def buildapplet():
# Ask for source text if not specified in sys.argv[1:]
if not sys.argv[1:]:
+ if EasyDialogs is None:
+ usage()
+ sys.exit(1)
+
filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:',
typeList=('TEXT', 'APPL'))
if not filename: