Python 2.4 fixes for modules
This commit is contained in:
parent
3bc6228b97
commit
060266e291
2 changed files with 3 additions and 3 deletions
|
@ -182,7 +182,7 @@ def main():
|
|||
|
||||
if state in ['dump','import']:
|
||||
if target is None:
|
||||
module.fail_json(msg="with state={0} target is required".format(state))
|
||||
module.fail_json(msg="with state=%s target is required" % (state))
|
||||
connect_to_db = db
|
||||
else:
|
||||
connect_to_db = 'mysql'
|
||||
|
|
|
@ -718,7 +718,7 @@ class SunOS(User):
|
|||
continue
|
||||
fields[1] = self.password
|
||||
line = ':'.join(fields)
|
||||
lines.append('{0}\n'.format(line))
|
||||
lines.append('%s\n' % line)
|
||||
open(self.SHADOWFILE, 'w+').writelines(lines)
|
||||
except Exception, err:
|
||||
self.module.fail_json(msg="failed to update users password: %s" % str(err))
|
||||
|
@ -800,7 +800,7 @@ class SunOS(User):
|
|||
continue
|
||||
fields[1] = self.password
|
||||
line = ':'.join(fields)
|
||||
lines.append('{0}\n'.format(line))
|
||||
lines.append('%s\n' % line)
|
||||
open(self.SHADOWFILE, 'w+').writelines(lines)
|
||||
rc = 0
|
||||
except Exception, err:
|
||||
|
|
Loading…
Reference in a new issue