[Checkins]
SVN: zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py
Add a small fallback for the case that PyPI is not maintaining the
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Oct 5 20:34:47 EDT 2007
Log message for revision 80676:
Add a small fallback for the case that PyPI is not maintaining the
release files.
Changed:
U zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py
-=-
Modified: zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py
===================================================================
--- zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py 2007-10-06 00:27:58 UTC (rev 80675)
+++ zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py 2007-10-06 00:34:46 UTC (rev 80676)
@@ -216,5 +216,10 @@
dist_links = server.package_urls(package, version)
for link in dist_links:
links.append(link_templ %link)
- open(os.path.join(package_path, 'index.html'), 'w').write(
- templ %{'package': package, 'links': '\n'.join(links)})
+ if links:
+ open(os.path.join(package_path, 'index.html'), 'w').write(
+ templ %{'package': package, 'links': '\n'.join(links)})
+ else:
+ # A small fallback, in case PyPI does not maintain the release
+ # files.
+ get_page(dest, package)
More information about the Checkins
mailing list