From 6c76097531b26ff9f69709f8725192e8c8fff791 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 21 Jun 2010 09:07:06 +0000 Subject: Updated files to match PEP 257 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5953 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2-build-reports | 10 +++++----- src/sbin/bcfg2-info | 12 ++++++------ src/sbin/bcfg2-ping-sweep | 2 +- src/sbin/bcfg2-reports | 4 ++-- src/sbin/bcfg2-server | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/sbin/bcfg2-build-reports b/src/sbin/bcfg2-build-reports index 602735bc5..dd5d9ce84 100755 --- a/src/sbin/bcfg2-build-reports +++ b/src/sbin/bcfg2-build-reports @@ -1,7 +1,7 @@ #!/usr/bin/env python -"""bcfg2-build-reports Generates & distributes reports of statistic information -for bcfg2""" +"""bcfg2-build-reports generates & distributes reports of statistic information +for Bcfg2.""" __revision__ = '$Revision$' @@ -109,7 +109,7 @@ def rss(reportxml, delivery, report): fil.close() def www(reportxml, delivery): - """www outputs report to""" + """www outputs report to.""" #this can later link to WWW report if one gets published simultaneously? for destination in delivery.findall('Destination'): @@ -119,7 +119,7 @@ def www(reportxml, delivery): fil.close() def fileout(reportxml, delivery): - """outputs to plain text file""" + """Outputs to plain text file.""" for destination in delivery.findall('Destination'): fil = open(destination.attrib['address'], 'w') @@ -192,7 +192,7 @@ if __name__ == '__main__': # os.system('GenerateHostInfo')#Generate HostInfo needs to be in path - """Reads Data & Config files""" + """Reads data & config files.""" try: statsdata = XML(open(statpath).read()) except (IOError, XMLSyntaxError): diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 7a724d19b..fefeec79e 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -1,6 +1,6 @@ #!/usr/bin/python -"""This tool loads the Bcfg2 core into an interactive debugger""" +"""This tool loads the Bcfg2 core into an interactive debugger.""" __revision__ = '$Revision$' from code import InteractiveConsole @@ -40,7 +40,7 @@ class FileNotBuilt(Exception): return repr(self.value) def printTabular(rows): - """print data in tabular format.""" + """Print data in tabular format.""" cmax = tuple([max([len(str(row[index])) for row in rows]) + 1 \ for index in range(len(rows[0]))]) fstring = (" %%-%ss |" * len(cmax)) % cmax @@ -149,7 +149,7 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): do_exit = do_quit def do_help(self, _): - """Print out usage info""" + """Print out usage info.""" print 'Commands:' print 'build - build config for hostname, writing to filename' print 'builddir - build config for hostname, writing separate files to dirname' @@ -172,15 +172,15 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): def do_update(self, _): - """Process pending fs events""" + """Process pending fs events.""" self.fam.handle_events_in_interval(0.1) def do_version(self, _): - """Print out code version""" + """Print out code version.""" print(__revision__) def do_build(self, args): - """Build client configuration""" + """Build client configuration.""" alist = args.split() path_force = False if '-f' in args: diff --git a/src/sbin/bcfg2-ping-sweep b/src/sbin/bcfg2-ping-sweep index c1beac312..4082cad8b 100755 --- a/src/sbin/bcfg2-ping-sweep +++ b/src/sbin/bcfg2-ping-sweep @@ -1,7 +1,7 @@ #!/usr/bin/env python #GenerateHostInfo - Joey Hagedorn - hagedorn@mcs.anl.gov -"""Generates hostinfo.xml at a regular interval""" +"""Generates hostinfo.xml at a regular interval.""" __revision__ = '$Revision$' diff --git a/src/sbin/bcfg2-reports b/src/sbin/bcfg2-reports index bf8112dd8..f3e60d89e 100755 --- a/src/sbin/bcfg2-reports +++ b/src/sbin/bcfg2-reports @@ -1,5 +1,5 @@ #! /usr/bin/env python -"""Query reporting system for client status""" +"""Query reporting system for client status.""" __revision__ = '$Revision$' import os @@ -42,7 +42,7 @@ def statecompare(client1, client2): return 0 def crit_compare(criterion, client1, client2): - """Compares two clients by the criteria provided in criterion""" + """Compares two clients by the criteria provided in criterion.""" for crit in criterion: comp = 0 if crit == 'name': diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index 62bad7633..dd251caa8 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -1,6 +1,6 @@ #!/usr/bin/env python -"""The XML-RPC Bcfg2 Server""" +"""The XML-RPC Bcfg2 Server.""" __revision__ = '$Revision$' import logging -- cgit v1.2.3-1-g7c22