(1) is just pylint not liking something named "dir".
(2) is a legitimate bug - it's disk.format.partedDevice elsewhere in this function. --- blivet/devicelibs/dasd.py | 4 ++-- tests/devices_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blivet/devicelibs/dasd.py b/blivet/devicelibs/dasd.py index 965b4be..eb4da80 100644 --- a/blivet/devicelibs/dasd.py +++ b/blivet/devicelibs/dasd.py @@ -55,8 +55,8 @@ _IOC_NONE = 0 _IOC_WRITE = 1 _IOC_READ = 2
-def _IOC(dir, typ, nr, size): - return (((dir) << _IOC_DIRSHIFT) | \ +def _IOC(direction, typ, nr, size): + return (((direction) << _IOC_DIRSHIFT) | \ ((typ) << _IOC_TYPESHIFT) | \ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) diff --git a/tests/devices_test.py b/tests/devices_test.py index 3239049..3499341 100644 --- a/tests/devices_test.py +++ b/tests/devices_test.py @@ -797,7 +797,7 @@ class PartitionDeviceTestCase(unittest.TestCase): free = disk.format.partedDisk.getFreeSpaceRegions()[-1] raw_start = int(Size("9 MiB") / sector_size) start = disk.format.alignment.alignUp(free, raw_start) + 3 - disk.format.addPartition(start, disk.partedDevice.length - 1) + disk.format.addPartition(start, disk.format.partedDevice.length - 1)
# Verify the end of the free region immediately following the first # partition is unaligned.
On Wed, 2015-07-08 at 14:40 -0400, Chris Lumens wrote:
(1) is just pylint not liking something named "dir".
(2) is a legitimate bug - it's disk.format.partedDevice elsewhere in this function.
blivet/devicelibs/dasd.py | 4 ++-- tests/devices_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/blivet/devicelibs/dasd.py b/blivet/devicelibs/dasd.py index 965b4be..eb4da80 100644 --- a/blivet/devicelibs/dasd.py +++ b/blivet/devicelibs/dasd.py @@ -55,8 +55,8 @@ _IOC_NONE = 0 _IOC_WRITE = 1 _IOC_READ = 2
-def _IOC(dir, typ, nr, size):
- return (((dir) << _IOC_DIRSHIFT) | \
+def _IOC(direction, typ, nr, size):
- return (((direction) << _IOC_DIRSHIFT) | \ ((typ) << _IOC_TYPESHIFT) | \ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT))
diff --git a/tests/devices_test.py b/tests/devices_test.py index 3239049..3499341 100644 --- a/tests/devices_test.py +++ b/tests/devices_test.py @@ -797,7 +797,7 @@ class PartitionDeviceTestCase(unittest.TestCase): free = disk.format.partedDisk.getFreeSpaceRegions()[-1] raw_start = int(Size("9 MiB") / sector_size) start = disk.format.alignment.alignUp(free, raw_start) + 3
disk.format.addPartition(start, disk.partedDevice.length - 1)
disk.format.addPartition(start, disk.format.partedDevice.length - 1) # Verify the end of the free region immediately following the first # partition is unaligned.
ACK.
anaconda-patches@lists.fedorahosted.org