From 014bf9d6112af6ac062156d3b8032a8f08e12ba3 Mon Sep 17 00:00:00 2001 From: Tetiana Lashchova Date: Fri, 5 Dec 2014 15:21:14 +0200 Subject: Remove i18n import from loguserdata.py Change-Id: I47bc858e6f0d0b92a103cf40fdf47e1c8d5c89c5 Closes-Bug: #1399642 --- heat/cloudinit/loguserdata.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'heat/cloudinit/loguserdata.py') diff --git a/heat/cloudinit/loguserdata.py b/heat/cloudinit/loguserdata.py index 0655413d4..396da8bbc 100755 --- a/heat/cloudinit/loguserdata.py +++ b/heat/cloudinit/loguserdata.py @@ -21,9 +21,6 @@ import pkg_resources import subprocess import sys -from heat.common.i18n import _LE -from heat.common.i18n import _LI - VAR_PATH = '/var/lib/heat-cfntools' LOG = logging.getLogger('heat-provision') @@ -62,14 +59,14 @@ def call(args): except OSError: ex_type, ex, tb = sys.exc_info() if ex.errno == errno.ENOEXEC: - LOG.error(_LE('Userdata empty or not executable: %s'), ex) + LOG.error('Userdata empty or not executable: %s', ex) return os.EX_OK else: - LOG.error(_LE('OS error running userdata: %s'), ex) + LOG.error('OS error running userdata: %s', ex) return os.EX_OSERR except Exception: ex_type, ex, tb = sys.exc_info() - LOG.error(_LE('Unknown error running userdata: %s'), ex) + LOG.error('Unknown error running userdata: %s', ex) return os.EX_SOFTWARE return p.returncode @@ -78,16 +75,16 @@ def main(): if not chk_ci_version(): # pre 0.6.0 - user data executed via cloudinit, not this helper - LOG.error(_LE('Unable to log provisioning, need a newer version ' - 'of cloud-init')) + LOG.error('Unable to log provisioning, need a newer version of ' + 'cloud-init') return -1 userdata_path = os.path.join(VAR_PATH, 'cfn-userdata') os.chmod(userdata_path, int("700", 8)) - LOG.info(_LI('Provision began: %s'), datetime.datetime.now()) + LOG.info('Provision began: %s', datetime.datetime.now()) returncode = call([userdata_path]) - LOG.info(_LI('Provision done: %s'), datetime.datetime.now()) + LOG.info('Provision done: %s', datetime.datetime.now()) if returncode: return returncode @@ -97,7 +94,7 @@ if __name__ == '__main__': code = main() if code: - LOG.error(_LE('Provision failed with exit code %s'), code) + LOG.error('Provision failed with exit code %s', code) sys.exit(code) provision_log = os.path.join(VAR_PATH, 'provision-finished') -- cgit v1.2.1