From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: pylint: Add the missing tests for oop.os.rename()
......................................................................
Patch Set 2:
(2 comments)
https://gerrit.ovirt.org/#/c/75841/2/tests/storage_outofprocess_test.py
File tests/storage_outofprocess_test.py:
PS2, Line 116: src = os.path.join(tmpdir, "src")
: src_subdir = os.path.join(src, "subdir")
: os.makedirs(src_subdir)
: src_file = os.path.join(src_subdir, "file")
: with io.open(src_file, "wb") as f:
: f.write(b"it works")
: dst = os.path.join(tmpdir, "dst")
this begs to be placed in a helper function, to be used by the next test as well (if we actually need the next test)...
Line 127: dst_file = os.path.join(tmpdir, "dst", "subdir", "file")
Line 128: with io.open(dst_file, "rb") as f:
Line 129: self.assertEqual(f.read(), b"it works")
Line 130:
Line 131: @xfail("Fails when destination directory not empty")
... but the real question is why do we even need this convoluted logic. It was originally a bad idea to modify the os.rename semantics instead of returning ENOTEMPTY.
I'd argue that raising AttributeError is closer to the correct semantics than overwriting nonempty destination dir.
Line 132: def testOsRenameDestExists(self):
Line 133: with namedTemporaryDir() as tmpdir:
Line 134: src = os.path.join(tmpdir, "src")
Line 135: src_subdir = os.path.join(src, "subdir")
--
To view, visit https://gerrit.ovirt.org/75841
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib34e94ee0d5fcb14f808fe5f1763d165a10d441f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: pylint: Fix AttributeError hiding the real error
......................................................................
pylint: Fix AttributeError hiding the real error
If running a protected function failed, the error handler used to raise
with AttributeError trying to log the real exception with self.name
instead of name.
The error was introduced in commit 12e8853ddbb5 (dispatcher: use a
method wrapper instead of Protect) in Apr 2014, "refactoring" code
without tests.
Change-Id: Ie976e4a69df23e643a90dab7b18839dc023bf8dc
Bug-Url: https://bugzilla.redhat.com/1444657
Reported-by: pylint
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M lib/vdsm/storage/dispatcher.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Freddy Rolland: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75786
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie976e4a69df23e643a90dab7b18839dc023bf8dc
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: pylint: Clean tc.filter from pylint errors
......................................................................
pylint: Clean tc.filter from pylint errors
Pylint detects an assignment from a function that does not specify any
return value.
Change-Id: Ic4f16dcae6307994f779308f643cd654be31a283
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M lib/vdsm/network/tc/filter.py
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Edward Haas: Verified
--
To view, visit https://gerrit.ovirt.org/75810
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4f16dcae6307994f779308f643cd654be31a283
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: pylint: Silence pylint errors in infra
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/75748/1/lib/vdsm/utils.py
File lib/vdsm/utils.py:
Line 30: from collections import namedtuple, deque, OrderedDict
Line 31: from contextlib import contextmanager
Line 32: from fnmatch import fnmatch
Line 33: from .compat import pickle
Line 34: # pylint: disable=no-name-in-module
not needed: fixed in Ib3d663a0da26d647b5b2f18a1dcc18dfcdd09f36
Line 35: import distutils.spawn
Line 36: import errno
Line 37: import functools
Line 38: import glob
--
To view, visit https://gerrit.ovirt.org/75748
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia7baa0f07abc67cb5cf0477bf07128178c394fe2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: net tests: migrating testDelWithoutAdd to the new functional tests
......................................................................
net tests: migrating testDelWithoutAdd to the new functional tests
Change-Id: I4992c209a3f0008190e39f3ee6d47f0f41bd2584
Signed-off-by: Leon Goldberg <lgoldber(a)redhat.com>
---
M tests/functional/networkTests.py
M tests/network/func_net_basic_test.py
2 files changed, 7 insertions(+), 6 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Leon Goldberg: Verified
Edward Haas: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/75756
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4992c209a3f0008190e39f3ee6d47f0f41bd2584
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: pylint: Clean tc.filter from pylint errors
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/75810
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic4f16dcae6307994f779308f643cd654be31a283
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: pylint: Do not check distutils attributes
......................................................................
pylint: Do not check distutils attributes
In a virtualenv, distutils namespace is replaced with some
black-magic code that can't be statically analysed.
Therefore, its member attributes should not be checked.
Cf. https://github.com/PyCQA/pylint/issues/73
Change-Id: Ib3d663a0da26d647b5b2f18a1dcc18dfcdd09f36
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M pylintrc
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/75809
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3d663a0da26d647b5b2f18a1dcc18dfcdd09f36
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: pylint: Do not check distutils attributes
......................................................................
Patch Set 2: Code-Review+2 Verified+1
--
To view, visit https://gerrit.ovirt.org/75809
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib3d663a0da26d647b5b2f18a1dcc18dfcdd09f36
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: net tests: migrating testFailWithInvalidNic to the new functional tests
......................................................................
net tests: migrating testFailWithInvalidNic to the new functional tests
Change-Id: I2a95ee3c2687a077a4f3ddc2de283a2ef4b896a7
Signed-off-by: Leon Goldberg <lgoldber(a)redhat.com>
---
M tests/functional/networkTests.py
M tests/network/func_net_basic_test.py
2 files changed, 15 insertions(+), 8 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Leon Goldberg: Verified
Edward Haas: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/75740
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a95ee3c2687a077a4f3ddc2de283a2ef4b896a7
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>