summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-31 00:04:24 +0000
committerCollin Winter <collinw@gmail.com>2007-08-31 00:04:24 +0000
commit828f04ac3f0dd3b68b4dbf42a79ebb846d1de568 (patch)
tree21e25d3d969ce636c32539e4d4b5255dc4c85702 /Mac
parent150b7d7d02eca6970d792f3e6887f957a36b6ca2 (diff)
downloadcpython-git-828f04ac3f0dd3b68b4dbf42a79ebb846d1de568.tar.gz
Issue #1066: implement PEP 3109, 2/3 of PEP 3134.
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/BuildScript/build-installer.py10
-rw-r--r--Mac/Tools/Doc/setup.py5
-rw-r--r--Mac/scripts/buildpkg.py2
-rw-r--r--Mac/scripts/mkestrres.py2
4 files changed, 9 insertions, 10 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index c7ebce81d1..0b62ea6016 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -54,7 +54,7 @@ def getFullVersion():
if 'PY_VERSION' in ln:
return ln.split()[-1][1:-1]
- raise RuntimeError, "Cannot find full version??"
+ raise RuntimeError("Cannot find full version??")
# The directory we'll use to create the build (will be erased and recreated)
WORKDIR = "/tmp/_py"
@@ -291,7 +291,7 @@ def runCommand(commandline):
xit = fd.close()
if xit != None:
sys.stdout.write(data)
- raise RuntimeError, "command failed: %s"%(commandline,)
+ raise RuntimeError("command failed: %s"%(commandline,))
if VERBOSE:
sys.stdout.write(data); sys.stdout.flush()
@@ -302,7 +302,7 @@ def captureCommand(commandline):
xit = fd.close()
if xit != None:
sys.stdout.write(data)
- raise RuntimeError, "command failed: %s"%(commandline,)
+ raise RuntimeError("command failed: %s"%(commandline,))
return data
@@ -361,7 +361,7 @@ def parseOptions(args=None):
SRCDIR=v
else:
- raise NotImplementedError, k
+ raise NotImplementedError(k)
SRCDIR=os.path.abspath(SRCDIR)
WORKDIR=os.path.abspath(WORKDIR)
@@ -418,7 +418,7 @@ def extractArchive(builddir, archiveName):
xit = fp.close()
if xit is not None:
sys.stdout.write(data)
- raise RuntimeError, "Cannot extract %s"%(archiveName,)
+ raise RuntimeError("Cannot extract %s"%(archiveName,))
return os.path.join(builddir, retval)
diff --git a/Mac/Tools/Doc/setup.py b/Mac/Tools/Doc/setup.py
index 5f60c5184d..e1d8fb1891 100644
--- a/Mac/Tools/Doc/setup.py
+++ b/Mac/Tools/Doc/setup.py
@@ -59,7 +59,7 @@ class DocBuild(build):
dirname = 'Python-Docs-%s' % self.doc_version
if os.path.exists(self.build_html):
- raise RuntimeError, '%s: already exists, please remove and try again' % self.build_html
+ raise RuntimeError('%s: already exists, please remove and try again' % self.build_html)
os.chdir(self.build_base)
self.spawn('curl','-O', url)
self.spawn('tar', '-xjf', tarfile)
@@ -146,8 +146,7 @@ class DocBuild(build):
self.mkpath(self.build_base)
self.ensureHtml()
if not os.path.isdir(self.build_html):
- raise RuntimeError, \
- "Can't find source folder for documentation."
+ raise RuntimeError("Can't find source folder for documentation.")
self.mkpath(self.build_dest)
if dep_util.newer(os.path.join(self.build_html,'index.html'), os.path.join(self.build_dest,'index.html')):
self.mkpath(self.build_dest)
diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py
index 73dd4b6dfc..ad0afe46c5 100644
--- a/Mac/scripts/buildpkg.py
+++ b/Mac/scripts/buildpkg.py
@@ -194,7 +194,7 @@ class PackageMaker:
if k in fields:
self.packageInfo[k] = v
elif not k in ["OutputDir"]:
- raise Error, "Unknown package option: %s" % k
+ raise Error("Unknown package option: %s" % k)
# Check where we should leave the output. Default is current directory
outputdir = options.get("OutputDir", os.getcwd())
diff --git a/Mac/scripts/mkestrres.py b/Mac/scripts/mkestrres.py
index d4238922c2..93af56e1b4 100644
--- a/Mac/scripts/mkestrres.py
+++ b/Mac/scripts/mkestrres.py
@@ -33,7 +33,7 @@ ERRORS_PROG_2="[ \t]*" \
def Pstring(str):
if len(str) > 255:
- raise ValueError, 'String too large'
+ raise ValueError('String too large')
return chr(len(str))+str
def writeestr(dst, edict):