~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/pgstats.py

  • Committer: William Grant
  • Date: 2012-01-01 03:10:25 UTC
  • mto: This revision was merged to the branch mainline in revision 14614.
  • Revision ID: william.grant@canonical.com-20120101031025-pcl0na3sbgfrztcw
utilities

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
__metaclass__ = type
12
12
 
13
13
import sys
 
14
 
14
15
import psycopg2
15
16
 
 
17
 
16
18
def percentage(num, total):
17
19
    """Return a percentage string of num/total"""
18
20
    if total == 0: