[PATCH 0/2] Fix make check-local issues

Lucio Correia (2): Fix name mismatch with imported module Fix PEP8 issues src/wok/config.py.in | 19 +++++++++++-------- src/wok/plugins/kimchi/model/host.py | 4 ++-- src/wok/plugins/kimchi/tests/test_config.py.in | 1 - src/wok/plugins/kimchi/tests/test_host.py | 5 ++--- 4 files changed, 15 insertions(+), 14 deletions(-)

Signed-off-by: Lucio Correia <luciojhc@linux.vnet.ibm.com> --- src/wok/plugins/kimchi/model/host.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wok/plugins/kimchi/model/host.py b/src/wok/plugins/kimchi/model/host.py index ddfbf0f..f32cf62 100644 --- a/src/wok/plugins/kimchi/model/host.py +++ b/src/wok/plugins/kimchi/model/host.py @@ -338,12 +338,12 @@ class DevicesModel(object): xmlstr = dom.XMLDesc(0) root = objectify.fromstring(xmlstr) try: - hostdev = root.devices.hostdev + hostDevices = root.devices.hostdev except AttributeError: continue vm_devs = [DeviceModel.deduce_dev_name(e, self.conn) - for e in hostdev] + for e in hostDevices] for dev in vm_devs: unavailable_devs.append(dev) -- 1.7.1

Signed-off-by: Lucio Correia <luciojhc@linux.vnet.ibm.com> --- src/wok/config.py.in | 19 +++++++++++-------- src/wok/plugins/kimchi/tests/test_config.py.in | 1 - src/wok/plugins/kimchi/tests/test_host.py | 5 ++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/wok/config.py.in b/src/wok/config.py.in index 3540aea..c4e1c65 100644 --- a/src/wok/config.py.in +++ b/src/wok/config.py.in @@ -41,14 +41,17 @@ FONT_FILES = {'fontawesome': ['fontawesome-webfont.ttf'], 'OpenSans-Regular.ttf']} FONTS_PATH = { - 'fontawesome': - ['/usr/share/fonts/fontawesome', - '/usr/share/fonts/truetype/font-awesome', - '/usr/share/fonts/truetype'], - 'opensans': - ['/usr/share/fonts/open-sans', - '/usr/share/fonts/truetype/', - '/usr/share/texlive/texmf-dist/fonts/truetype/public/opensans']} + 'fontawesome': [ + '/usr/share/fonts/fontawesome', + '/usr/share/fonts/truetype/font-awesome', + '/usr/share/fonts/truetype' + ], + 'opensans': [ + '/usr/share/fonts/open-sans', + '/usr/share/fonts/truetype/', + '/usr/share/texlive/texmf-dist/fonts/truetype/public/opensans' + ] +} def get_object_store(): diff --git a/src/wok/plugins/kimchi/tests/test_config.py.in b/src/wok/plugins/kimchi/tests/test_config.py.in index 93ee287..e4db15a 100644 --- a/src/wok/plugins/kimchi/tests/test_config.py.in +++ b/src/wok/plugins/kimchi/tests/test_config.py.in @@ -163,7 +163,6 @@ class ConfigTests(unittest.TestCase): wok_config = WokConfig() self.assertEquals(wok_config, configObj) - def test_kimchi_config(self): KimchiPaths.get_prefix = PluginPaths.get_prefix = get_prefix paths = KimchiPaths() diff --git a/src/wok/plugins/kimchi/tests/test_host.py b/src/wok/plugins/kimchi/tests/test_host.py index a673d8e..f3da49b 100644 --- a/src/wok/plugins/kimchi/tests/test_host.py +++ b/src/wok/plugins/kimchi/tests/test_host.py @@ -209,9 +209,8 @@ class HostTests(unittest.TestCase): resp = self.request('/plugins/kimchi/host/devices?_passthrough=true') all_devs = [dev['name'] for dev in json.loads(resp.read())] - resp = self.request( - '/plugins/kimchi/host/devices?_passthrough=true&_available_only=true' - ) + resp = self.request('/plugins/kimchi/host/devices?' + '_passthrough=true&_available_only=true') available_devs = [dev['name'] for dev in json.loads(resp.read())] self.assertLessEqual(len(available_devs), len(all_devs)) -- 1.7.1

Reviewed-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com> On 01-10-2015 17:42, Lucio Correia wrote:
Lucio Correia (2): Fix name mismatch with imported module Fix PEP8 issues
src/wok/config.py.in | 19 +++++++++++-------- src/wok/plugins/kimchi/model/host.py | 4 ++-- src/wok/plugins/kimchi/tests/test_config.py.in | 1 - src/wok/plugins/kimchi/tests/test_host.py | 5 ++--- 4 files changed, 15 insertions(+), 14 deletions(-)
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Jose Ricardo Ziviani ----------------------------- Software Engineer Linux Technology Center - IBM

Have you noticed this RuntimeWarning in your environment? I am getting this message here when I run make check-local: $ make check-local contrib/check_i18n.py ./i18n.py Checking for invalid i18n string... ./i18n.py:20: RuntimeWarning: Parent module '' not found while handling absolute import import gettext Checking for invalid i18n string successfully If it happens with everyone else, can you take a look into that in this same patchset? Thanks, Daniel On 10/01/2015 05:42 PM, Lucio Correia wrote:
Lucio Correia (2): Fix name mismatch with imported module Fix PEP8 issues
src/wok/config.py.in | 19 +++++++++++-------- src/wok/plugins/kimchi/model/host.py | 4 ++-- src/wok/plugins/kimchi/tests/test_config.py.in | 1 - src/wok/plugins/kimchi/tests/test_host.py | 5 ++--- 4 files changed, 15 insertions(+), 14 deletions(-)
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 10/02/2015 09:28 AM, Daniel Henrique Barboza wrote:
Have you noticed this RuntimeWarning in your environment? I am getting this message here when I run make check-local:
$ make check-local contrib/check_i18n.py ./i18n.py Checking for invalid i18n string... ./i18n.py:20: RuntimeWarning: Parent module '' not found while handling absolute import import gettext Checking for invalid i18n string successfully
If it happens with everyone else, can you take a look into that in this same patchset?
Thanks,
Daniel
Yes, it happens in my env too. Working on it. -- Lucio Correia Software Engineer IBM LTC Brazil
participants (3)
-
Daniel Henrique Barboza
-
Jose Ricardo Ziviani
-
Lucio Correia