From c99167e6d3fa4619b07a22ee8c6863c873adddb5 Mon Sep 17 00:00:00 2001 From: Joel Andres Granados Date: Mon, 14 Jul 2008 19:11:16 +0200 Subject: Clean up passwd.py file. --- plugins/passwd.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/passwd.py b/plugins/passwd.py index 79139b7..508ec0b 100644 --- a/plugins/passwd.py +++ b/plugins/passwd.py @@ -25,16 +25,19 @@ from random import Random rng = Random() class PasswdPlugin(Plugin): - """This plugin provides operations for convenient manipulation with the password system.""" + """This plugin provides operations for convenient manipulation with the + password system.""" # # Additional flow defprepareion. # - # flows = Flow.init(Plugin) # we do not need the default fix and diagnose flows + # flows = Flow.init(Plugin) # we do not need the default fix and diagnose + # flows flows = {} flows["resetRoot"] = Flow({ Plugin.initial: {Return: "resetRoot"}, "resetRoot" : {ReturnSuccess: Plugin.final} - }, description="Reset root password to random value so the user can login and change it") + }, description="Reset root password to random value so " \ + "the user can login and change it") name = "Password plugin" version = "0.0.1" @@ -48,14 +51,17 @@ class PasswdPlugin(Plugin): Plugin.__init__(self, *args, **kwargs) def resetRoot(self): - charlist = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ.," + charlist = "abcdefghijklmnopqrstuvwxyz" \ + "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ.," passlen = 10 newpasswd = [] while len(newpasswd)