Flip compairson for whether sector size is equal in Sectors

This commit is contained in:
Anders Ingemann 2015-04-29 20:46:53 +02:00
parent 40f66d48cc
commit c8ddd7de45

View file

@ -134,7 +134,7 @@ class Sectors(object):
if isinstance(other, (int, long)):
return Sectors(self.bytes / other, self.sector_size)
if isinstance(other, Sectors):
if self.sector_size != other.sector_size:
if self.sector_size == other.sector_size:
return self.bytes / other.bytes
else:
raise UnitError('Cannot divide sectors with different sector sizes')