[csw-devel] SF.net SVN: gar:[18224] csw/mgar/gar/v2/lib/python

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Jun 5 10:17:00 CEST 2012


Revision: 18224
          http://gar.svn.sourceforge.net/gar/?rev=18224&view=rev
Author:   wahwah
Date:     2012-06-05 08:17:00 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
pkgdb: Insignificant changes, lumped together

Mostly cleanup.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/integrate_catalogs.py
    csw/mgar/gar/v2/lib/python/pkgdb.py
    csw/mgar/gar/v2/lib/python/system_pkgmap.py

Modified: csw/mgar/gar/v2/lib/python/integrate_catalogs.py
===================================================================
--- csw/mgar/gar/v2/lib/python/integrate_catalogs.py	2012-06-05 08:16:38 UTC (rev 18223)
+++ csw/mgar/gar/v2/lib/python/integrate_catalogs.py	2012-06-05 08:17:00 UTC (rev 18224)
@@ -258,8 +258,12 @@
   if options.from_json:
     with open(options.from_json, "rb") as fd:
       logging.info("Loading %s", options.from_json)
-      bundles_by_md5, jsonable_catalogs, diffs_by_catalogname = cjson.decode(fd.read())
-      catalogs = dict((tuple(cjson.decode(x)), jsonable_catalogs[x]) for x in jsonable_catalogs)
+      (bundles_by_md5,
+          jsonable_catalogs,
+          diffs_by_catalogname) = cjson.decode(fd.read())
+      catalogs = dict(
+        (tuple(cjson.decode(x)), jsonable_catalogs[x])
+        for x in jsonable_catalogs)
   else:
     catalogs, diffs_by_catalogname = GetDiffsByCatalogname(
         catrel_from, catrel_to, options.include_downgrades,

Modified: csw/mgar/gar/v2/lib/python/pkgdb.py
===================================================================
--- csw/mgar/gar/v2/lib/python/pkgdb.py	2012-06-05 08:16:38 UTC (rev 18223)
+++ csw/mgar/gar/v2/lib/python/pkgdb.py	2012-06-05 08:17:00 UTC (rev 18224)
@@ -578,7 +578,8 @@
   elif command == 'gen-cat':
     catrel = options.catrel or 'dublin'
     if options.catrel and options.catrel != catrel:
-      logging.warn("Generating the %s catalog.", catrel)
+      logging.warn("Generating the %s catalog, not %s.",
+                   catrel, options.catrel)
     if catrel not in CATALOGS_ALLOWED_TO_GENERATE:
       raise UsageError(
           "Catalog %s not allowed to be generated from the database. "

Modified: csw/mgar/gar/v2/lib/python/system_pkgmap.py
===================================================================
--- csw/mgar/gar/v2/lib/python/system_pkgmap.py	2012-06-05 08:16:38 UTC (rev 18223)
+++ csw/mgar/gar/v2/lib/python/system_pkgmap.py	2012-06-05 08:17:00 UTC (rev 18224)
@@ -427,6 +427,7 @@
     pbar.maxval = len(contents) / progressbar_divisor
     pbar.start()
     cleaned_pkgs = set()
+    logging.debug("Content leghts: %s", len(contents))
     for d in contents:
       i = count.next()
       if not i % update_period and (i / progressbar_divisor) <= pbar.maxval:

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list