Shut up pylint about win32_disk_size
The pylint job is non-voting, but it was annoying to see it fail. To add the insult to injury, the code was correct, but the pylint was not smart enough. So this patch only exists to address shortcomings of our toolchain. Change-Id: I391e03426c42b7af122722cd851c4aa03f2dcb68
This commit is contained in:
parent
dfef52f3a6
commit
63b6e56960
@ -555,6 +555,7 @@ class ChunkedBackupDriver(driver.BackupDriver, metaclass=abc.ABCMeta):
|
||||
'backup. Do a full backup.')
|
||||
raise exception.InvalidBackup(reason=err)
|
||||
|
||||
win32_disk_size = None
|
||||
if sys.platform == 'win32':
|
||||
# When dealing with Windows physical disks, we need the exact
|
||||
# size of the disk. Attempting to read passed this boundary will
|
||||
@ -602,7 +603,7 @@ class ChunkedBackupDriver(driver.BackupDriver, metaclass=abc.ABCMeta):
|
||||
break
|
||||
data_offset = volume_file.tell()
|
||||
|
||||
if sys.platform == 'win32':
|
||||
if win32_disk_size is not None:
|
||||
read_bytes = min(self.chunk_size_bytes,
|
||||
win32_disk_size - data_offset)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user