Fix some name errors in Mac modules.

This commit is contained in:
Georg Brandl 2010-02-06 23:54:43 +00:00
parent 7e1902bced
commit 1f6176e794
3 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@ class _MediaDescriptionCodec:
data = data[:self.size]
values = struct.unpack(self.fmt, data)
if len(values) != len(self.names):
raise Error, ('Format length does not match number of names', descr)
raise Error, ('Format length does not match number of names')
rv = {}
for i in range(len(values)):
name = self.names[i]
@ -26,7 +26,7 @@ class _MediaDescriptionCodec:
rv[name] = value
return rv
def encode(dict):
def encode(self, dict):
list = [self.fmt]
for name in self.names:
if type(name) == type(()):

View File

@ -432,7 +432,7 @@ class AppBuilder(BundleBuilder):
pass
elif self.mainprogram is not None:
self.name = os.path.splitext(os.path.basename(self.mainprogram))[0]
elif executable is not None:
elif self.executable is not None:
self.name = os.path.splitext(os.path.basename(self.executable))[0]
if self.name[-4:] != ".app":
self.name += ".app"

View File

@ -10,6 +10,7 @@ warnpy3k("In 3.x, the macostools module is removed.", stacklevel=2)
from Carbon import Res
from Carbon import File, Files
import os
import errno
import MacOS
try:
openrf = MacOS.openrf