Account for the instance of submodules.pack.Packer #104184
@ -48,16 +48,10 @@ class MsgProgress(Message):
|
|||||||
@dataclass
|
@dataclass
|
||||||
class MsgDone(Message):
|
class MsgDone(Message):
|
||||||
output_path: Path
|
output_path: Path
|
||||||
"""Path of the submitted blend file, relative to the Shaman checkout root."""
|
|
||||||
actual_checkout_path: PurePosixPath
|
|
||||||
"""Shaman checkout path, i.e. the root of the job files, relative to the Shaman checkout root."""
|
"""Shaman checkout path, i.e. the root of the job files, relative to the Shaman checkout root."""
|
||||||
missing_files: list[Path]
|
missing_files: list[Path]
|
||||||
|
"""Path of the submitted blend file, relative to the Shaman checkout root."""
|
||||||
|
actual_checkout_path: Optional[PurePosixPath] = None
|
||||||
@dataclass
|
|
||||||
class MsgDoneNotShaman(Message):
|
|
||||||
output_path: Path
|
|
||||||
missing_files: list[Path]
|
|
||||||
|
|
||||||
|
|
||||||
# MyPy doesn't understand the way BAT subpackages are imported.
|
# MyPy doesn't understand the way BAT subpackages are imported.
|
||||||
@ -174,14 +168,12 @@ class PackThread(threading.Thread):
|
|||||||
self._set_bat_status("DONE")
|
self._set_bat_status("DONE")
|
||||||
dr.sybren marked this conversation as resolved
|
|||||||
|
|
||||||
if isinstance(self.packer, submodules.pack.Packer):
|
if isinstance(self.packer, submodules.pack.Packer):
|
||||||
msg = MsgDoneNotShaman(
|
msg = MsgDone(self.packer.output_path, self.packer.missing_files)
|
||||||
self.packer.output_path, self.packer.missing_files
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
msg = MsgDone(
|
msg = MsgDone(
|
||||||
self.packer.output_path,
|
self.packer.output_path,
|
||||||
self.packer.actual_checkout_path,
|
|
||||||
self.packer.missing_files,
|
self.packer.missing_files,
|
||||||
|
self.packer.actual_checkout_path,
|
||||||
)
|
)
|
||||||
self.queue.put(msg)
|
self.queue.put(msg)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
I think the code can be simplified to:
That way the entire
if
can go away, and it's no longer specific to a particularPacker
implementation.