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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Jan 13 18:39:17 CET 2013


Revision: 20113
          http://gar.svn.sourceforge.net/gar/?rev=20113&view=rev
Author:   wahwah
Date:     2013-01-13 17:39:17 +0000 (Sun, 13 Jan 2013)
Log Message:
-----------
pkgdb: Small logging improvements

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_stats.py

Modified: csw/mgar/gar/v2/lib/python/package_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats.py	2013-01-13 17:38:48 UTC (rev 20112)
+++ csw/mgar/gar/v2/lib/python/package_stats.py	2013-01-13 17:39:17 UTC (rev 20113)
@@ -185,7 +185,7 @@
 
     """
     dir_pkg = self.GetInspectivePkg()
-    logging.debug("Collecting %s package statistics.", repr(dir_pkg.pkgname))
+    logging.debug("Collecting %r (%r) package statistics.", dir_pkg, dir_pkg.pkgname)
     override_dicts = self.GetOverrides()
     basic_stats = self.GetBasicStats()
     # This would be better inferred from pkginfo, and not from the filename, but
@@ -248,7 +248,8 @@
     except sqlobject.main.SQLObjectNotFound, e:
       filename_arch = m.Architecture(
           name=pkg_stats["basic_stats"]["parsed_basename"]["arch"])
-    parsed_basename = pkg_stats["basic_stats"]["parsed_basename"]
+    basename = pkg_stats["basic_stats"]["parsed_basename"]
+    parsed_basename = basename
     os_rel_name = parsed_basename["osrel"]
     try:
       os_rel = m.OsRelease.select(
@@ -286,7 +287,8 @@
       logging.debug("Cleaning %s before saving it again", db_pkg_stats)
       db_pkg_stats.DeleteAllDependentObjects()
     except sqlobject.main.SQLObjectNotFound, e:
-      logging.debug("Package %s not present in the db, proceeding with insert.")
+      logging.debug("Package %s not present in the db, proceeding with insert.",
+                    basename)
       pass
     # Creating the object in the database.
     data_obj = m.Srv4FileStatsBlob(

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