Sandro Bonazzola has uploaded a new change for review.

Change subject: build: fix recent pep8 warnings
......................................................................

build: fix recent pep8 warnings

Fixed errors detected with pep8 1.6.2
E731 do not assign a lambda expression, use a def

Sorted all import blocks.

Change-Id: If8270af2d6d9f7392361918332afb31b60e2eefd
Signed-off-by: Sandro Bonazzola <sbona...@redhat.com>
---
M src/ovirt_hosted_engine_setup/check_liveliness.py
M src/ovirt_hosted_engine_setup/constants.py
M src/ovirt_hosted_engine_setup/domains.py
M src/ovirt_hosted_engine_setup/mixins.py
M src/ovirt_hosted_engine_setup/set_maintenance.py
M src/ovirt_hosted_engine_setup/tasks.py
M src/ovirt_hosted_engine_setup/vm_status.py
M src/plugins/ovirt-hosted-engine-setup/core/answerfile.py
M src/plugins/ovirt-hosted-engine-setup/core/conf.py
M src/plugins/ovirt-hosted-engine-setup/core/misc.py
M src/plugins/ovirt-hosted-engine-setup/core/offlinepackager.py
M src/plugins/ovirt-hosted-engine-setup/core/preview.py
M src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
M src/plugins/ovirt-hosted-engine-setup/core/shell.py
M src/plugins/ovirt-hosted-engine-setup/core/titles.py
M src/plugins/ovirt-hosted-engine-setup/engine/add_disk.py
M src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
M src/plugins/ovirt-hosted-engine-setup/engine/fqdn.py
M src/plugins/ovirt-hosted-engine-setup/engine/health.py
M src/plugins/ovirt-hosted-engine-setup/engine/os_install.py
M src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py
M src/plugins/ovirt-hosted-engine-setup/ha/ha_services.py
M src/plugins/ovirt-hosted-engine-setup/libvirt/configureqemu.py
M src/plugins/ovirt-hosted-engine-setup/libvirt/workarounds.py
M src/plugins/ovirt-hosted-engine-setup/network/bridge.py
M src/plugins/ovirt-hosted-engine-setup/network/firewall.py
M src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
M src/plugins/ovirt-hosted-engine-setup/network/gateway.py
M src/plugins/ovirt-hosted-engine-setup/network/iptables.py
M src/plugins/ovirt-hosted-engine-setup/pki/vdsmpki.py
M src/plugins/ovirt-hosted-engine-setup/sanlock/lockspace.py
M src/plugins/ovirt-hosted-engine-setup/storage/blockd.py
M src/plugins/ovirt-hosted-engine-setup/storage/nfs.py
M src/plugins/ovirt-hosted-engine-setup/storage/storage.py
M src/plugins/ovirt-hosted-engine-setup/system/sshd.py
M src/plugins/ovirt-hosted-engine-setup/system/vdsmenv.py
M src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py
M src/plugins/ovirt-hosted-engine-setup/vdsmd/vdsmconf.py
M src/plugins/ovirt-hosted-engine-setup/vm/boot_cdrom.py
M src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
M src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py
M src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
M src/plugins/ovirt-hosted-engine-setup/vm/image.py
M src/plugins/ovirt-hosted-engine-setup/vm/mac.py
M src/plugins/ovirt-hosted-engine-setup/vm/machine.py
M src/plugins/ovirt-hosted-engine-setup/vm/memory.py
M src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
47 files changed, 231 insertions(+), 166 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/73/38473/1

diff --git a/src/ovirt_hosted_engine_setup/check_liveliness.py 
b/src/ovirt_hosted_engine_setup/check_liveliness.py
index cbfc7b6..e013f4e 100644
--- a/src/ovirt_hosted_engine_setup/check_liveliness.py
+++ b/src/ovirt_hosted_engine_setup/check_liveliness.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -30,7 +30,8 @@
 from otopi import util
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/ovirt_hosted_engine_setup/constants.py 
b/src/ovirt_hosted_engine_setup/constants.py
index caab163..435975a 100644
--- a/src/ovirt_hosted_engine_setup/constants.py
+++ b/src/ovirt_hosted_engine_setup/constants.py
@@ -27,10 +27,13 @@
 
 
 from otopi import util
+
+
 from ovirt_hosted_engine_setup import config
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 def ohostedattrsclass(o):
diff --git a/src/ovirt_hosted_engine_setup/domains.py 
b/src/ovirt_hosted_engine_setup/domains.py
index 9d307a5..942b4a6 100644
--- a/src/ovirt_hosted_engine_setup/domains.py
+++ b/src/ovirt_hosted_engine_setup/domains.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -17,17 +17,19 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
+
+import gettext
 import os
 import re
 import tempfile
-import gettext
 
 
 from otopi import base
 from otopi import util
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 class InsufficientSpaceError(Exception):
diff --git a/src/ovirt_hosted_engine_setup/mixins.py 
b/src/ovirt_hosted_engine_setup/mixins.py
index 943e372..e267b82 100644
--- a/src/ovirt_hosted_engine_setup/mixins.py
+++ b/src/ovirt_hosted_engine_setup/mixins.py
@@ -17,18 +17,22 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
+
 """VM Utils"""
 
-import string
-import random
+
 import gettext
+import random
+import string
 import time
+
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import tasks
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 class VmOperations(object):
diff --git a/src/ovirt_hosted_engine_setup/set_maintenance.py 
b/src/ovirt_hosted_engine_setup/set_maintenance.py
index 96ca277..65c9951 100644
--- a/src/ovirt_hosted_engine_setup/set_maintenance.py
+++ b/src/ovirt_hosted_engine_setup/set_maintenance.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,8 @@
 from ovirt_hosted_engine_ha.client import client
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 class Maintenance(object):
diff --git a/src/ovirt_hosted_engine_setup/tasks.py 
b/src/ovirt_hosted_engine_setup/tasks.py
index e0d298f..a039c01 100644
--- a/src/ovirt_hosted_engine_setup/tasks.py
+++ b/src/ovirt_hosted_engine_setup/tasks.py
@@ -17,8 +17,9 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
-import time
+
 import gettext
+import time
 
 
 from otopi import base
@@ -28,7 +29,8 @@
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/ovirt_hosted_engine_setup/vm_status.py 
b/src/ovirt_hosted_engine_setup/vm_status.py
index 5a93793..b894e1d 100644
--- a/src/ovirt_hosted_engine_setup/vm_status.py
+++ b/src/ovirt_hosted_engine_setup/vm_status.py
@@ -30,7 +30,8 @@
 from ovirt_hosted_engine_ha.lib.exceptions import BrokerConnectionError
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 class VmStatus(object):
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py 
b/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py
index 0ea5b6d..c28fcbe 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -21,22 +21,23 @@
 """Answer file plugin."""
 
 
+import datetime
 import gettext
 import os
-import datetime
 
 
-from otopi import util
 from otopi import common
-from otopi import plugin
 from otopi import constants as otopicons
+from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/conf.py 
b/src/plugins/ovirt-hosted-engine-setup/core/conf.py
index 3758d47..1abd940 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/conf.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/conf.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,17 +25,18 @@
 
 
 from otopi import constants as otopicons
-from otopi import util
-from otopi import plugin
-from otopi import transaction
 from otopi import filetransaction
+from otopi import plugin
+from otopi import util
+from otopi import transaction
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/misc.py 
b/src/plugins/ovirt-hosted-engine-setup/core/misc.py
index a44d32f..e504c99 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/misc.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/misc.py
@@ -25,16 +25,17 @@
 
 
 from otopi import constants as otopicons
-from otopi import util
 from otopi import context as otopicontext
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/offlinepackager.py 
b/src/plugins/ovirt-hosted-engine-setup/core/offlinepackager.py
index 86bb122..af8aa28 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/offlinepackager.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/offlinepackager.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,11 +26,12 @@
 
 from otopi import constants as otopicons
 from otopi import packager
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/preview.py 
b/src/plugins/ovirt-hosted-engine-setup/core/preview.py
index ecf127b..29c832f 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/preview.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/preview.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,14 +24,15 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py 
b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
index 97a26cb..ac1be22 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,16 +29,17 @@
 import tempfile
 
 
-from otopi import constants as otopicons
-from otopi import util
 from otopi import common
+from otopi import constants as otopicons
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/shell.py 
b/src/plugins/ovirt-hosted-engine-setup/core/shell.py
index cadc100..d14173a 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/shell.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/shell.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -20,20 +20,22 @@
 
 """Shell detection plugin."""
 
+
 import gettext
 import os
 
 
-from otopi import util
+from otopi import constants as otopicons
 from otopi import context
 from otopi import plugin
-from otopi import constants as otopicons
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/core/titles.py 
b/src/plugins/ovirt-hosted-engine-setup/core/titles.py
index 274ebed..f7d9b8b 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/titles.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/titles.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -22,16 +22,19 @@
 Customization sections title plugin.
 """
 
+
 import gettext
 
-from otopi import util
+
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/add_disk.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/add_disk.py
index 567c397..9af94a8 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/add_disk.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/add_disk.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2014 Red Hat, Inc.
+# Copyright (C) 2014-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,18 +27,19 @@
 
 
 import ovirtsdk.api
-import ovirtsdk.xml
 import ovirtsdk.infrastructure.errors
+import ovirtsdk.xml
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
index afc8819..81071a7 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py
@@ -26,22 +26,22 @@
 import gettext
 import os
 import re
+import socket
 import tempfile
 import time
 import urllib2
-import socket
 
 
 import ovirtsdk.api
-import ovirtsdk.xml
 import ovirtsdk.infrastructure.errors
+import ovirtsdk.xml
 
 
-from otopi import util
-from otopi import plugin
 from otopi import constants as otopicons
-from otopi import transaction
 from otopi import filetransaction
+from otopi import plugin
+from otopi import transaction
+from otopi import util
 
 
 from vdsm import netinfo
@@ -51,7 +51,8 @@
 from ovirt_hosted_engine_setup import vds_info
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/fqdn.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/fqdn.py
index 33de6ce..b6f7d12 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/fqdn.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/fqdn.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,14 +26,15 @@
 import socket
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/health.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/health.py
index 898e26f..6300d77 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/health.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/health.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,16 +26,17 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
-from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import check_liveliness
+from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import mixins
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py 
b/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py
index 17813b3..992abd7 100644
--- a/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py
+++ b/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,18 +25,20 @@
 
 import gettext
 
-from otopi import util
+
+from otopi import constants as otopicons
+from otopi import filetransaction
 from otopi import plugin
 from otopi import transaction
-from otopi import filetransaction
-from otopi import constants as otopicons
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py 
b/src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py
index 50a5206..eaa89f7 100644
--- a/src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py
+++ b/src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,7 @@
 """
 
 
-import ConfigParser
+import configparser
 import gettext
 import re
 import StringIO
@@ -31,15 +31,16 @@
 
 
 from otopi import constants as otopicons
-from otopi import util
-from otopi import plugin
 from otopi import filetransaction
+from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
@@ -118,7 +119,7 @@
             ohostedcons.Const.HA_NOTIF_SMTP_DEST_EMAILS: (
                 ohostedcons.NotificationsEnv.DEFAULT_DEST_EMAIL),
         }
-        self._cfg = ConfigParser.SafeConfigParser()
+        self._cfg = configparser.SafeConfigParser()
         self._cfg.read(self._conffile)
         if self._cfg.has_section('email'):
             for name, value in dict(self._cfg.items('email')).items():
diff --git a/src/plugins/ovirt-hosted-engine-setup/ha/ha_services.py 
b/src/plugins/ovirt-hosted-engine-setup/ha/ha_services.py
index b20c0ff..40704e2 100644
--- a/src/plugins/ovirt-hosted-engine-setup/ha/ha_services.py
+++ b/src/plugins/ovirt-hosted-engine-setup/ha/ha_services.py
@@ -27,15 +27,16 @@
 import os
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import tasks
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/libvirt/configureqemu.py 
b/src/plugins/ovirt-hosted-engine-setup/libvirt/configureqemu.py
index 2f2e074..aeeb87d 100644
--- a/src/plugins/ovirt-hosted-engine-setup/libvirt/configureqemu.py
+++ b/src/plugins/ovirt-hosted-engine-setup/libvirt/configureqemu.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -28,17 +28,18 @@
 import re
 
 
-from otopi import util
+from otopi import constants as otopicons
+from otopi import filetransaction
 from otopi import plugin
 from otopi import transaction
-from otopi import filetransaction
-from otopi import constants as otopicons
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/libvirt/workarounds.py 
b/src/plugins/ovirt-hosted-engine-setup/libvirt/workarounds.py
index c19420f..f5a0829 100644
--- a/src/plugins/ovirt-hosted-engine-setup/libvirt/workarounds.py
+++ b/src/plugins/ovirt-hosted-engine-setup/libvirt/workarounds.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,11 +27,12 @@
 import sys
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/bridge.py 
b/src/plugins/ovirt-hosted-engine-setup/network/bridge.py
index 29cc680..1f83d44 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/bridge.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/bridge.py
@@ -24,15 +24,15 @@
 
 
 import errno
+import ethtool
 import gettext
 import os
 
 
-import ethtool
-
-
 from otopi import util
 from otopi import plugin
+
+
 from vdsm import netinfo
 
 
@@ -40,7 +40,8 @@
 from ovirt_hosted_engine_setup import vds_info
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/firewall.py 
b/src/plugins/ovirt-hosted-engine-setup/network/firewall.py
index 98a4c7c..b55c0cc 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/firewall.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/firewall.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,14 +25,15 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py 
b/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
index 6181136..e30d8bf 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/firewall_manager.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -23,24 +23,23 @@
 """
 
 
-import os
 import gettext
-
-
 import libxml2
+import os
 
 
-from otopi import util
-from otopi import plugin
 from otopi import constants as otopicons
 from otopi import filetransaction
+from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
@@ -244,8 +243,9 @@
     @plugin.event(
         stage=plugin.Stages.STAGE_CLOSEUP,
         condition=lambda self: (
-            self.environment[ohostedcons.NetworkEnv.FIREWALL_MANAGER] is None
-            and
+            self.environment[
+                ohostedcons.NetworkEnv.FIREWALL_MANAGER
+            ] is None and
             not self.environment[ohostedcons.CoreEnv.IS_ADDITIONAL_HOST]
         ),
 
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/gateway.py 
b/src/plugins/ovirt-hosted-engine-setup/network/gateway.py
index aa8ed6d..e687d72 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/gateway.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/gateway.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -28,14 +28,15 @@
 import struct
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/network/iptables.py 
b/src/plugins/ovirt-hosted-engine-setup/network/iptables.py
index a4f7e5d..1b25f36 100644
--- a/src/plugins/ovirt-hosted-engine-setup/network/iptables.py
+++ b/src/plugins/ovirt-hosted-engine-setup/network/iptables.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2014 Red Hat, Inc.
+# Copyright (C) 2014-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -28,11 +28,12 @@
 
 
 from otopi import constants
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/pki/vdsmpki.py 
b/src/plugins/ovirt-hosted-engine-setup/pki/vdsmpki.py
index b107bff..6057f12 100644
--- a/src/plugins/ovirt-hosted-engine-setup/pki/vdsmpki.py
+++ b/src/plugins/ovirt-hosted-engine-setup/pki/vdsmpki.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -21,24 +21,25 @@
 """VDSM PKI plugin."""
 
 
+import datetime
 import gettext
 import glob
 import os
+import re
 import shutil
 import tempfile
-import re
-import datetime
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/sanlock/lockspace.py 
b/src/plugins/ovirt-hosted-engine-setup/sanlock/lockspace.py
index 80bd992..fa4c008 100644
--- a/src/plugins/ovirt-hosted-engine-setup/sanlock/lockspace.py
+++ b/src/plugins/ovirt-hosted-engine-setup/sanlock/lockspace.py
@@ -23,20 +23,24 @@
 """
 
 import gettext
+import os
 import sanlock
 import stat
-import os
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
+
+
+from ovirt_hosted_engine_ha.lib import storage_backends
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
-from ovirt_hosted_engine_ha.lib import storage_backends
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
@@ -152,8 +156,11 @@
 
         # Compute the size needed to store metadata for all hosts
         # and for the global cluster state
-        md_size = (ohostedcons.Const.METADATA_CHUNK_SIZE
-                   * (ohostedcons.Const.MAX_HOST_ID + 1))
+        md_size = (
+            ohostedcons.Const.METADATA_CHUNK_SIZE * (
+                ohostedcons.Const.MAX_HOST_ID + 1
+            )
+        )
 
         with ohostedutil.VirtUserContext(
             self.environment,
diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/blockd.py 
b/src/plugins/ovirt-hosted-engine-setup/storage/blockd.py
index 64edb1d..1dc23aa 100644
--- a/src/plugins/ovirt-hosted-engine-setup/storage/blockd.py
+++ b/src/plugins/ovirt-hosted-engine-setup/storage/blockd.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2014 Red Hat, Inc.
+# Copyright (C) 2014-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -36,7 +36,9 @@
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import domains as ohosteddomains
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/nfs.py 
b/src/plugins/ovirt-hosted-engine-setup/storage/nfs.py
index e0c89cc..ca4027b 100644
--- a/src/plugins/ovirt-hosted-engine-setup/storage/nfs.py
+++ b/src/plugins/ovirt-hosted-engine-setup/storage/nfs.py
@@ -22,21 +22,22 @@
 NFS / GlusterFS storage plugin.
 """
 
-import os
 import gettext
+import os
 import tempfile
 import time
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import domains as ohosteddomains
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py 
b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
index c0303fc..2044599 100644
--- a/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
+++ b/src/plugins/ovirt-hosted-engine-setup/storage/storage.py
@@ -22,15 +22,15 @@
 Local storage domain plugin.
 """
 
-import re
-import uuid
 import gettext
+import re
 import stat
+import uuid
 
 
 from otopi import constants as otopicons
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
@@ -42,7 +42,8 @@
 from ovirt_hosted_engine_ha.lib import storage_backends
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/system/sshd.py 
b/src/plugins/ovirt-hosted-engine-setup/system/sshd.py
index 94d608a..9d343f0 100644
--- a/src/plugins/ovirt-hosted-engine-setup/system/sshd.py
+++ b/src/plugins/ovirt-hosted-engine-setup/system/sshd.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,14 +26,15 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/system/vdsmenv.py 
b/src/plugins/ovirt-hosted-engine-setup/system/vdsmenv.py
index 0d2c4c2..2c2e28a 100644
--- a/src/plugins/ovirt-hosted-engine-setup/system/vdsmenv.py
+++ b/src/plugins/ovirt-hosted-engine-setup/system/vdsmenv.py
@@ -20,15 +20,15 @@
 
 """VDSM misc plugin."""
 
-import pwd
-import grp
 import gettext
+import grp
+import pwd
 import socket
 import time
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from vdsm import vdscli
@@ -37,7 +37,8 @@
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py 
b/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py
index 74ca6f6..dcea3b5 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vdsmd/cpu.py
@@ -26,8 +26,8 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_host_deploy import hardware
@@ -36,7 +36,8 @@
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vdsmd/vdsmconf.py 
b/src/plugins/ovirt-hosted-engine-setup/vdsmd/vdsmconf.py
index 0dc29e8..3f568ae 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vdsmd/vdsmconf.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vdsmd/vdsmconf.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -29,17 +29,18 @@
 import StringIO  # FIXME: May need some otopi magic for python3 compatibility
 
 
-from otopi import util
+from otopi import constants as otopicons
+from otopi import filetransaction
 from otopi import plugin
 from otopi import transaction
-from otopi import filetransaction
-from otopi import constants as otopicons
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/boot_cdrom.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/boot_cdrom.py
index c83ca4d..3307c43 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/boot_cdrom.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/boot_cdrom.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -30,14 +30,15 @@
 import stat
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
index 2a96091..d5a657e 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
@@ -32,17 +32,18 @@
 import tempfile
 
 
-from otopi import util
 from otopi import plugin
 from otopi import transaction
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
-from ovirt_hosted_engine_setup.ovf import ovfenvelope
 from ovirt_hosted_engine_setup import domains as ohosteddomains
+from ovirt_hosted_engine_setup.ovf import ovfenvelope
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 class ImageTransaction(transaction.TransactionElement):
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py
index e70d84e..74e9c0d 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py
@@ -23,22 +23,23 @@
 """
 
 
-import uuid
 import gettext
+import uuid
 
 
-from otopi import util
+from otopi import constants as otopicons
+from otopi import filetransaction
 from otopi import plugin
 from otopi import transaction
-from otopi import filetransaction
-from otopi import constants as otopicons
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
index c654bc4..ad88ef6 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,14 +26,15 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/image.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/image.py
index ee8a533..e60f210 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/image.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/image.py
@@ -22,12 +22,13 @@
 VM image creation plugin.
 """
 
-import uuid
+
 import gettext
+import uuid
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
@@ -35,7 +36,8 @@
 from ovirt_hosted_engine_setup import tasks
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/mac.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/mac.py
index 165b266..e241abd 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/mac.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/mac.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013-2014 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,15 +26,16 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import util as ohostedutil
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/machine.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/machine.py
index 5f5852e..ab6c74b 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/machine.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/machine.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,14 +27,15 @@
 import platform
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/memory.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
index ae1897e..265028e 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
@@ -1,6 +1,6 @@
 #
 # ovirt-hosted-engine-setup -- ovirt hosted engine setup
-# Copyright (C) 2013 Red Hat, Inc.
+# Copyright (C) 2013-2015 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -26,14 +26,15 @@
 import gettext
 
 
-from otopi import util
 from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export
diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
index 74081ab..06719f1 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/runvm.py
@@ -25,16 +25,17 @@
 
 import gettext
 
-from otopi import util
-from otopi import plugin
 from otopi import constants as otopicons
+from otopi import plugin
+from otopi import util
 
 
 from ovirt_hosted_engine_setup import constants as ohostedcons
 from ovirt_hosted_engine_setup import mixins
 
 
-_ = lambda m: gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
+def _(m):
+    return gettext.dgettext(message=m, domain='ovirt-hosted-engine-setup')
 
 
 @util.export


-- 
To view, visit https://gerrit.ovirt.org/38473
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8270af2d6d9f7392361918332afb31b60e2eefd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to