Revision: 10482 http://gar.svn.sourceforge.net/gar/?rev=10482&view=rev Author: wahwah Date: 2010-07-09 11:53:26 +0000 (Fri, 09 Jul 2010)
Log Message: ----------- mGAR v2: checkpkg_inspect_stats.py, add an option to print the stats to stdout. Modified Paths: -------------- csw/mgar/gar/v2/bin/checkpkg_inspect_stats.py Modified: csw/mgar/gar/v2/bin/checkpkg_inspect_stats.py =================================================================== --- csw/mgar/gar/v2/bin/checkpkg_inspect_stats.py 2010-07-09 10:12:24 UTC (rev 10481) +++ csw/mgar/gar/v2/bin/checkpkg_inspect_stats.py 2010-07-09 11:53:26 UTC (rev 10482) @@ -21,6 +21,8 @@ parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Turn on debugging messages") + parser.add_option("-p", "--print_stats", dest="print_stats", + default=False, action="store_true") options, args = parser.parse_args() if options.debug: logging.basicConfig(level=logging.DEBUG) @@ -31,7 +33,10 @@ srv4_pkgs = [opencsw.CswSrv4File(x) for x in filenames] pkgstats = [checkpkg.PackageStats(x) for x in srv4_pkgs] pkgstats = [x.GetAllStats() for x in pkgstats] - code.interact(local=locals()) + if options.print_stats: + pprint.pprint(pkgstats) + else: + code.interact(local=locals()) if __name__ == '__main__': - main() + main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel