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:
Lubomír Sedlář 2019-06-11 08:45:16 +02:00
parent 0207260b9f
commit 2a9490526a
1 changed files with 2 additions and 1 deletions

View File

@ -326,7 +326,8 @@ class KojiPackageSet(PackageSetBase):
result["koji_profile"] = self.koji_wrapper.profile
del result["koji_wrapper"]
del result["_logger"]
del result["cache_region"]
if "cache_region" in result:
del result["cache_region"]
return result
def __setstate__(self, data):