[Python-checkins] python/dist/src/Lib/plat-mac bundlebuilder.py,1.35,1.36

jvr@users.sourceforge.net jvr@users.sourceforge.net
Thu, 10 Jul 2003 07:53:30 -0700


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv28283

Modified Files:
	bundlebuilder.py 
Log Message:
Fixed a bug that's been there from the beginning but wasn't noticed
until now: the inheritance of default values was the wrong way around.
This caused app bundles to get a type of "BNDL" instead of "APPL".
Apparently this is not a problem until you try to drag your app to
the dock.
----------------------------------------------------------------------


Index: bundlebuilder.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/bundlebuilder.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** bundlebuilder.py	4 Jul 2003 14:20:03 -0000	1.35
--- bundlebuilder.py	10 Jul 2003 14:53:27 -0000	1.36
***************
*** 55,65 ****
      def _getDefaults(cls):
          defaults = {}
          for name, value in cls.__dict__.items():
              if name[0] != "_" and not isinstance(value,
                      (function, classmethod)):
                  defaults[name] = deepcopy(value)
-         for base in cls.__bases__:
-             if hasattr(base, "_getDefaults"):
-                 defaults.update(base._getDefaults())
          return defaults
      _getDefaults = classmethod(_getDefaults)
--- 55,65 ----
      def _getDefaults(cls):
          defaults = {}
+         for base in cls.__bases__:
+             if hasattr(base, "_getDefaults"):
+                 defaults.update(base._getDefaults())
          for name, value in cls.__dict__.items():
              if name[0] != "_" and not isinstance(value,
                      (function, classmethod)):
                  defaults[name] = deepcopy(value)
          return defaults
      _getDefaults = classmethod(_getDefaults)