summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Affolter <fabian@bernewireless.net>2010-06-21 07:13:43 +0000
committerSol Jerome <sol.jerome@gmail.com>2010-06-21 14:11:35 -0500
commitead071d65e6554c9b87fd11939d6a910109af3db (patch)
treef3a8411b360835ac749d60b9e4addc092b5b13f1
parent6180396f0b3a9c39ccb4c38f60fb89df842783ea (diff)
downloadbcfg2-ead071d65e6554c9b87fd11939d6a910109af3db.tar.gz
bcfg2-ead071d65e6554c9b87fd11939d6a910109af3db.tar.bz2
bcfg2-ead071d65e6554c9b87fd11939d6a910109af3db.zip
Updated files to match PEP 257
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5952 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg28
-rwxr-xr-xsrc/sbin/bcfg2-admin4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index a856a2c76..0a0651bca 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -22,7 +22,7 @@ import Bcfg2.Logger
logger = logging.getLogger('bcfg2')
def cb_sigint_handler(signum, frame):
- '''Exit upon CTRL-C'''
+ """Exit upon CTRL-C."""
os._exit(1)
DECISION_LIST = Bcfg2.Options.Option('Decision List', default=False,
@@ -106,7 +106,7 @@ class Client:
raise SystemExit(1)
def run_probe(self, probe):
- """Execute probe"""
+ """Execute probe."""
name = probe.get('name')
self.logger.info("Running probe %s" % name)
ret = Bcfg2.Client.XML.Element("probe-data",
@@ -132,12 +132,12 @@ class Client:
return ret
def fatal_error(self, message):
- """Signal a fatal error"""
+ """Signal a fatal error."""
self.logger.error("Fatal error: %s" % (message))
raise SystemExit(1)
def run(self):
- """Perform client execution phase"""
+ """Perform client execution phase."""
times = {}
# begin configuration
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin
index 49c9452bc..5884ff208 100755
--- a/src/sbin/bcfg2-admin
+++ b/src/sbin/bcfg2-admin
@@ -13,7 +13,7 @@ log = logging.getLogger('bcfg2-admin')
import Bcfg2.Server.Admin
def mode_import(modename):
- """Load Bcfg2.Server.Admin.<mode>"""
+ """Load Bcfg2.Server.Admin.<mode>."""
modname = modename.capitalize()
mod = getattr(__import__("Bcfg2.Server.Admin.%s" %
(modname)).Server.Admin, modname)
@@ -24,7 +24,7 @@ def get_modes():
return [x.lower() for x in Bcfg2.Server.Admin.__all__ if x != 'mode']
def create_description():
- """Create the description string from the list of modes"""
+ """Create the description string from the list of modes."""
modes = get_modes()
description = StringIO()
description.write("Available modes are:\n\n")