Commits

Lennart Regebro committed 159646f

Fix #6.

Comments (0)

Files changed (3)

pyroma/pypidata.py

         raise ValueError("Did not find '%s' on PyPI. Did you misspell it? It's case sensitive!" % project)
     release = releases[0]
     # Get the metadata:
-    logging.info("Found %s version %s" % (project, release))
+    logging.debug("Found %s version %s" % (project, release))
     data = client.release_data(project, release)
     
     # Map things around:
     owners = OWNER_RE.search(html).groups()[0]
     data['_owners'] = [x.strip() for x in owners.split(',')]
     
-    logging.info("Looking for documentation")
+    logging.debug("Looking for documentation")
     # See if there is any docs on http://pythonhosted.or
     page = urllib.urlopen('http://pythonhosted.org/' + project)
     if page.code == 200:
             tempdir = tempfile.gettempdir()
             filename = download['url'].split('/')[-1]
             tmp = os.path.join(tempdir, filename)
-            logging.info("Downloading %s to verify distribution" % filename)
+            logging.debug("Downloading %s to verify distribution" % filename)
             try:
                 with open(tmp, 'wb') as outfile:
                     outfile.write(urllib.urlopen(download['url']).read())

pyroma/ratings.py

     weight = 50
     
     def test(self, data):
-        return len(data.get('long_description')) > 100
+        return len(data.get('long_description', '')) > 100
     
     def message(self):
         return 'The packages long_description is quite short.'
     weight = 50
     
     def test(self, data):
-        source = data['long_description']
+        source = data.get('long_description', '')
         try:
             # Try to publish to HTML and see if we get an error or not.
             publish_parts(source=source, writer_name='html4css1')

pyroma/testdata/minimal/setup.py

 setup(name='minimal',
       version=version,
       description="Test",
-      long_description="""\
-""",
       classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='',
       author='',