]> granicus.if.org Git - python/commitdiff
Fix some name errors in Mac modules.
authorGeorg Brandl <georg@python.org>
Sat, 6 Feb 2010 23:54:43 +0000 (23:54 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 6 Feb 2010 23:54:43 +0000 (23:54 +0000)
Lib/plat-mac/Carbon/MediaDescr.py
Lib/plat-mac/bundlebuilder.py
Lib/plat-mac/macostools.py

index 254634bb29bd7823d06e6ffb30c227e7bd57c0ae..5431d1e3e89c3609049d6eb27bb764d0eb88171f 100644 (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(()):
index 7a710510f33fd8c0fab00cd010210f418e8d97ff..d13403c4b38daca013a8498b4152f1954024905c 100755 (executable)
@@ -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"
index 337cc7f1f1d46c5d5693d160de2d5b358e7a8085..395001ddc128ea83644ef548e331341c62699ef8 100644 (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