diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-03-30 13:38:24 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-03-30 13:38:24 -0400 |
commit | a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e (patch) | |
tree | 0e66df3c28e174a31f84fefad6b15694ed478928 | |
parent | cb770fdfebb4d196c45cbff524715fd5d1d8a0a5 (diff) | |
download | bcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.tar.gz bcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.tar.bz2 bcfg2-a9eb5c16471c3b34e9e89ac1eea3b5bb50478c3e.zip |
Use self.log.info() instead of 'print' to produce stats for
'bcfg2-admin reports purge' to make purge honor -q flag.
-rw-r--r-- | src/lib/Server/Admin/Reports.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Server/Admin/Reports.py b/src/lib/Server/Admin/Reports.py index a4dd19064..2a4c13c9c 100644 --- a/src/lib/Server/Admin/Reports.py +++ b/src/lib/Server/Admin/Reports.py @@ -59,12 +59,16 @@ def printStats(fn): fn(*data) - print "Clients removed: %s" % (start_client - Client.objects.count()) - print "Interactions removed: %s" % (start_i - Interaction.objects.count()) - print "Interactions->Entries removed: %s" % \ - (start_ei - Entries_interactions.objects.count()) - print "Metrics removed: %s" % (start_perf - Performance.objects.count()) - print "Ping metrics removed: %s" % (start_ping - Ping.objects.count()) + self.log.info("Clients removed: %s" % + (start_client - Client.objects.count())) + self.log.info("Interactions removed: %s" % + (start_i - Interaction.objects.count())) + self.log.info("Interactions->Entries removed: %s" % + (start_ei - Entries_interactions.objects.count())) + self.log.info("Metrics removed: %s" % + (start_perf - Performance.objects.count())) + self.log.info("Ping metrics removed: %s" % + (start_ping - Ping.objects.count())) return print_stats |