[Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.49,1.50

Neil Schemenauer nascheme@users.sourceforge.net
Mon, 03 Sep 2001 08:47:24 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv2758/Lib/distutils

Modified Files:
	dist.py 
Log Message:
Don't use dir() to find instance attribute names.


Index: dist.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** dist.py	2001/08/10 18:59:30	1.49
--- dist.py	2001/09/03 15:47:21	1.50
***************
*** 123,129 ****
          # object in a sneaky and underhanded (but efficient!) way.
          self.metadata = DistributionMetadata()
!         method_basenames = dir(self.metadata) + \
!                            ['fullname', 'contact', 'contact_email']
!         for basename in method_basenames:
              method_name = "get_" + basename
              setattr(self, method_name, getattr(self.metadata, method_name))
--- 123,127 ----
          # object in a sneaky and underhanded (but efficient!) way.
          self.metadata = DistributionMetadata()
!         for basename in self.metadata._METHOD_BASENAMES:
              method_name = "get_" + basename
              setattr(self, method_name, getattr(self.metadata, method_name))
***************
*** 962,965 ****
--- 960,969 ----
      author, and so forth.
      """
+ 
+     _METHOD_BASENAMES = ("name", "version", "author", "author_email",
+                          "maintainer", "maintainer_email", "url",
+                          "license", "description", "long_description",
+                          "keywords", "platforms", "fullname", "contact",
+                          "contact_email", "licence")
  
      def __init__ (self):