diff --git a/bootstrapvz/common/sectors.py b/bootstrapvz/common/sectors.py index 23679e7..ee7f37f 100644 --- a/bootstrapvz/common/sectors.py +++ b/bootstrapvz/common/sectors.py @@ -149,3 +149,13 @@ class Sectors(object): raise UnitError('Cannot take modulus of sectors with different sector sizes') self.bytes %= other.bytes return self + + def __getstate__(self): + return {'__class__': self.__module__ + '.' + self.__class__.__name__, + 'sector_size': self.sector_size, + 'bytes': self.bytes, + } + + def __setstate__(self, state): + self.sector_size = state['sector_size'] + self.bytes = state['bytes'] diff --git a/bootstrapvz/remote/__init__.py b/bootstrapvz/remote/__init__.py index d381830..bf4fd24 100644 --- a/bootstrapvz/remote/__init__.py +++ b/bootstrapvz/remote/__init__.py @@ -21,6 +21,7 @@ supported_classes = ['bootstrapvz.base.manifest.Manifest', 'bootstrapvz.base.fs.partitions.single.SinglePartition', 'bootstrapvz.base.fs.partitions.unformatted.UnformattedPartition', 'bootstrapvz.common.bytes.Bytes', + 'bootstrapvz.common.sectors.Sectors', ] supported_exceptions = ['bootstrapvz.common.exceptions.ManifestError',