PEP8 work on munin.py

This commit is contained in:
2010-10-25 14:32:59 +01:00
parent 22d8ff9d39
commit 254eca7589

View File

@@ -25,11 +25,14 @@ from hr.models import Application
from eve_proxy.models import CachedDocument from eve_proxy.models import CachedDocument
accepted_names = ['munin.py', 'auth_apikeys', 'auth_hrapplications', 'auth_eveapicache'] accepted_names = ['munin.py', 'auth_apikeys', 'auth_hrapplications',
'auth_eveapicache']
class Usage(Exception): class Usage(Exception):
pass pass
def main(argv=None): def main(argv=None):
if argv is None: if argv is None:
argv = sys.argv argv = sys.argv
@@ -78,9 +81,11 @@ def main(argv=None):
if execname == 'auth_apikeys': if execname == 'auth_apikeys':
print "keys.value %s" % EVEAccount.objects.filter(api_status=API_STATUS_OK).count() key_count = EVEAccount.objects.filter(api_status=API_STATUS_OK).count()
print "keys.value %s" % key_count
elif execname == 'auth_hrapplications': elif execname == 'auth_hrapplications':
view_status = [APPLICATION_STATUS_AWAITINGREVIEW, APPLICATION_STATUS_ACCEPTED, APPLICATION_STATUS_QUERY] view_status = [APPLICATION_STATUS_AWAITINGREVIEW,
APPLICATION_STATUS_ACCEPTED, APPLICATION_STATUS_QUERY]
apps = Application.objects.filter(status__in=view_status) apps = Application.objects.filter(status__in=view_status)
print "apps.value %s" % apps.count() print "apps.value %s" % apps.count()
elif execname == 'auth_eveapicache': elif execname == 'auth_eveapicache':