mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-29 11:51:14 +00:00
Added SegmentParser.reconstruct_segments to fill segments with actual data
* used when restoring segment parser from json
This commit is contained in:
parent
50488fc2e5
commit
40a5a3207a
@ -78,6 +78,12 @@ class SegmentParser:
|
||||
raise errors.InvalidSegmentParser(e)
|
||||
self.segments.extend(self.image.segments)
|
||||
|
||||
def reconstruct_segments(self, new_rawdata):
|
||||
self.image = self.get_image(new_rawdata)
|
||||
self.segment_data = new_rawdata
|
||||
for s in self.segments:
|
||||
s.reconstruct_raw(new_rawdata)
|
||||
|
||||
def get_image(self, r):
|
||||
return self.image_type(r)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user