aboutsummaryrefslogtreecommitdiff
path: root/rpkid/irbe_cli.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2009-05-11 06:37:32 +0000
committerRob Austein <sra@hactrn.net>2009-05-11 06:37:32 +0000
commita780a7809f44fdd4d088f81f3f8b97a055fbc9da (patch)
treeae1da6644a3a90b5d3fcfa123c64146d3854b6d2 /rpkid/irbe_cli.py
parent125c61b4f7040e1206fa3eb5b627147bbbd5645b (diff)
Cosmetic doc changes.
svn path=/rpkid/irbe-setup.py; revision=2424
Diffstat (limited to 'rpkid/irbe_cli.py')
-rwxr-xr-xrpkid/irbe_cli.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/rpkid/irbe_cli.py b/rpkid/irbe_cli.py
index 06c6c63a..992f8c84 100755
--- a/rpkid/irbe_cli.py
+++ b/rpkid/irbe_cli.py
@@ -24,7 +24,9 @@ import rpki.left_right, rpki.https, rpki.x509, rpki.config, rpki.log, rpki.publi
pem_out = None
class UsageWrapper(textwrap.TextWrapper):
- """Call interface around Python textwrap.Textwrapper class."""
+ """
+ Call interface around Python textwrap.Textwrapper class.
+ """
def __call__(self, *args):
"""Format arguments, with TextWrapper indentation."""
@@ -33,7 +35,9 @@ class UsageWrapper(textwrap.TextWrapper):
usage_fill = UsageWrapper(subsequent_indent = " " * 4)
class cmd_elt_mixin(object):
- """Protocol mix-in for command line client element PDUs."""
+ """
+ Protocol mix-in for command line client element PDUs.
+ """
## @var excludes
# XML attributes and elements that should not be allowed as command
@@ -44,7 +48,9 @@ class cmd_elt_mixin(object):
@classmethod
def usage(cls):
- """Generate usage message for this PDU."""
+ """
+ Generate usage message for this PDU.
+ """
args = " ".join("--" + x + "=" for x in cls.attributes + cls.elements if x not in cls.excludes)
bools = " ".join("--" + x for x in cls.booleans)
if args and bools:
@@ -53,7 +59,9 @@ class cmd_elt_mixin(object):
return args or bools
def client_getopt(self, argv):
- """Parse options for this class."""
+ """
+ Parse options for this class.
+ """
opts, argv = getopt.getopt(argv, "", [x + "=" for x in self.attributes + self.elements if x not in self.excludes] + list(self.booleans))
for o, a in opts:
o = o[2:]
@@ -101,11 +109,15 @@ class cmd_elt_mixin(object):
print " %s: %s" % (i, getattr(self, i))
class cmd_msg_mixin(object):
- """Protocol mix-in for command line client message PDUs."""
+ """
+ Protocol mix-in for command line client message PDUs.
+ """
@classmethod
def usage(cls):
- """Generate usage message for this PDU."""
+ """
+ Generate usage message for this PDU.
+ """
for k, v in cls.pdus.items():
print usage_fill(k, v.usage())