From f16ab9169c49c2c827aaf0bc9d6a1622faee93ee Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Thu, 10 Jan 2013 19:24:23 +0100 Subject: [PATCH] Python 2.4 fixes for modules --- mysql_db | 2 +- user | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql_db b/mysql_db index e660be73021..42150370506 100644 --- a/mysql_db +++ b/mysql_db @@ -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' diff --git a/user b/user index 1e7929d0f44..34d7ef17bfa 100644 --- a/user +++ b/user @@ -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: