[Checkins] SVN: zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py Converted url of index from a global variable to an argument as Jim

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Oct 5 18:27:51 EDT 2007


Log message for revision 80674:
  Converted url of index from a global variable to an argument as Jim 
  suggested.
  

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 22:21:05 UTC (rev 80673)
+++ zc.mirrorcheeseshopslashsimple/trunk/src/zc/mirrorcheeseshopslashsimple.py	2007-10-05 22:27:51 UTC (rev 80674)
@@ -19,7 +19,6 @@
 lock_file_path = 'pypy-poll-access.lock'
 poll_time_path = 'pypy-poll-timestamp'
 controlled_packages_path = 'controlled-packages.cfg'
-index_base_url = 'http://download.zope.org/'
 
 simple = "http://cheeseshop.python.org/simple/"
 
@@ -159,10 +158,16 @@
         lock.close()
 
 def generate_buildout(args=None):
-    dest = get_dest_dir(args)
-    # Create the link to the package index.
-    index_url = index_base_url + os.path.split(dest)[-1]
+    if args is None:
+        args = sys.argv[1:]
 
+    if len(args) != 2:
+        print "Usage: dest index_url"
+        sys.exit(1)
+
+    dest = os.path.abspath(args[0])
+    index_url = args[1]
+
     # Extract a list of all packages that need to be tested and record the
     # version to be tested. By default this version is the last available one.
     cpath = os.path.join(dest, controlled_packages_path)



More information about the Checkins mailing list