Anonymous committed e099f7b

Fix wrong URL when using as source

Don't add `simple/` in path if `simple.` in domain name (assumes that
any PyPi mirror that has `simple.` in its domain name will not also have
`simple/` in its URL scheme).

  • Participants
  • Parent commits 350658f

Comments (0)

Files changed (1)

File pypicache/

             yield url
     def get_simple_package_info(self, package):
-        uri = "{}simple/{}/".format(self.pypi_server, package)
+        uri = "{}{}{}/".format(
+            self.pypi_server,
+            '' if 'simple.' in self.pypi_server else 'simple/',
+            package,
+        )
         r = get_uri(uri)
         return r.content
         # TODO WIP in progress, trying to reproduce a simple page with links only