pkgset: Make serialization more resilient
If the package set is loaded from a pickle, it will not contain this key, and thus it can not be again written down into a new pickle. While this is not a common use case, it's still better not to crash in that case. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
0207260b9f
commit
2a9490526a
@ -326,7 +326,8 @@ class KojiPackageSet(PackageSetBase):
|
|||||||
result["koji_profile"] = self.koji_wrapper.profile
|
result["koji_profile"] = self.koji_wrapper.profile
|
||||||
del result["koji_wrapper"]
|
del result["koji_wrapper"]
|
||||||
del result["_logger"]
|
del result["_logger"]
|
||||||
del result["cache_region"]
|
if "cache_region" in result:
|
||||||
|
del result["cache_region"]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def __setstate__(self, data):
|
def __setstate__(self, data):
|
||||||
|
Loading…
Reference in New Issue
Block a user