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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Dec 29 01:13:32 CET 2010


Revision: 12118
          http://gar.svn.sourceforge.net/gar/?rev=12118&view=rev
Author:   wahwah
Date:     2010-12-29 00:13:32 +0000 (Wed, 29 Dec 2010)

Log Message:
-----------
checkpkg: pprint.pformat for logging

It might potentially degrade performance, but I doubt it will make any
noticeable difference.

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

Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2010-12-29 00:13:02 UTC (rev 12117)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2010-12-29 00:13:32 UTC (rev 12118)
@@ -349,8 +349,12 @@
     if file_path in self.pkgs_by_file:
       for pkg in self.pkgs_by_file[file_path]:
         pkgs.add(pkg)
+    if len(pkgs) < 6:
+      logging_response = pkgs
+    else:
+      logging_response = pprint.pformat(pkgs)
     logging.debug("GetPkgByPath(%s).AndReturn(%s)"
-                  % (file_path, pkgs))
+                  % (file_path, logging_response))
     return pkgs
 
   def GetInstalledPackages(self):
@@ -601,7 +605,7 @@
       ]
     """
     logging.debug("_ReportMissingDependencies(error_mgr, %s, %s, %s)",
-        pkgname, declared_deps, req_pkgs_reasons)
+        pkgname, declared_deps, pprint.pformat(req_pkgs_reasons))
     missing_reasons_by_pkg = {}
     for reason_group in req_pkgs_reasons:
       for pkg, reason in reason_group:


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