[Python-checkins] distutils2: Rename PyPIDistribution "location" to "downloaded_location".

tarek.ziade python-checkins at python.org
Sun Jul 4 11:48:40 CEST 2010


tarek.ziade pushed 5b76ba38fecf to distutils2:

http://hg.python.org/distutils2/rev/5b76ba38fecf
changeset:   333:5b76ba38fecf
user:        Alexis Metaireau <ametaireau at gmail.com>
date:        Tue Jun 29 18:20:35 2010 +0200
summary:     Rename PyPIDistribution "location" to "downloaded_location".
files:       src/distutils2/pypi/dist.py

diff --git a/src/distutils2/pypi/dist.py b/src/distutils2/pypi/dist.py
--- a/src/distutils2/pypi/dist.py
+++ b/src/distutils2/pypi/dist.py
@@ -23,7 +23,7 @@
     """Represents a distribution retrieved from PyPI.
 
     This is a simple container for various attributes as name, version,
-    location, url etc.
+    downloaded_location, url etc.
 
     The PyPIDistribution class is used by the pypi.*Index class to return
     information about distributions.
@@ -79,7 +79,7 @@
         self.type = type
         # set the downloaded path to None by default. The goal here
         # is to not download distributions multiple times
-        self.location = None
+        self.downloaded_location = None
         # We store urls in dict, because we need to have a bit more informations
         # than the simple URL. It will be used later to find the good url to
         # use.
@@ -125,14 +125,14 @@
             path = tempfile.mkdtemp()
 
         # if we do not have downloaded it yet, do it.
-        if self.location is None:
+        if self.downloaded_location is None:
             url = self.url['url']
             archive_name = urlparse.urlparse(url)[2].split('/')[-1]
             filename, headers = urllib.urlretrieve(url, 
                                                    path + "/" + archive_name)
-            self.location = filename
+            self.downloaded_location = filename
             self._check_md5(filename)
-        return self.location
+        return self.downloaded_location
 
     def _check_md5(self, filename):
         """Check that the md5 checksum of the given file matches the one in

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list