[Checkins]
SVN: zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py
Okay,
here is a version that works with ConfigParser. Each controlled
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Oct 5 16:46:41 EDT 2007
Log message for revision 80668:
Okay, here is a version that works with ConfigParser. Each controlled
package is now a section. The section title is the package name.
I will add new tools shortly that generate buildout.cfg files and new
package index pages for the controlled packages.
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-05 20:16:25 UTC (rev 80667)
+++ zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py 2007-10-05 20:46:41 UTC (rev 80668)
@@ -12,12 +12,13 @@
#
##############################################################################
+import ConfigParser
import os, sys, time, urllib, urllib2, xmlrpclib
import zc.lockfile
lock_file_path = 'pypy-poll-access.lock'
poll_time_path = 'pypy-poll-timestamp'
-controlled_packages_path = 'controlled-packages.txt'
+controlled_packages_path = 'controlled-packages.cfg'
repos = None
simple = "http://cheeseshop.python.org/simple/"
@@ -56,10 +57,9 @@
cpath = os.path.join(dest, controlled_packages_path)
if not os.path.exists(cpath):
return ()
- cfile = open(cpath, 'r')
- packages = tuple(cfile.readlines())
- cfile.close()
- return [name.strip() for name in packages]
+ config = ConfigParser.RawConfigParser()
+ config.read(cpath)
+ return tuple(config.sections())
def save_time(dest, timestamp):
open(os.path.join(dest, poll_time_path), 'w').write(
@@ -107,7 +107,7 @@
packages = sorted((
(timestamp, name)
for (name, version, timestamp, action)
- in server.changelog(last)
+ in server.changelog(last-3600*24)
))
packages = dict((
(name, timestamp)
More information about the Checkins
mailing list