diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-28 08:57:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 08:57:21 -0800 |
commit | 88c23b0632518d5b1449b0cd2afa82f4bd53a287 (patch) | |
tree | 770ba9138f698f067c833bf92d676c3bd1a34543 | |
parent | 8c15a1e067f510ca8471ca2a81cdf704e374332a (diff) | |
parent | 8b2affbd5bc56e822059b07730b52870760d39be (diff) | |
download | podman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.tar.gz podman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.tar.bz2 podman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.zip |
Merge pull request #1885 from edsantiago/split_token_none
_split_token(): handle None
-rw-r--r-- | contrib/python/podman/podman/libs/images.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/python/podman/podman/libs/images.py b/contrib/python/podman/podman/libs/images.py index 9453fb416..6dfc4a656 100644 --- a/contrib/python/podman/podman/libs/images.py +++ b/contrib/python/podman/podman/libs/images.py @@ -27,9 +27,10 @@ class Image(collections.UserDict): @staticmethod def _split_token(values=None, sep='='): + if not values: + return {} return { - k: v1 - for k, v1 in (v0.split(sep, 1) for v0 in values if values) + k: v1 for k, v1 in (v0.split(sep, 1) for v0 in values) } def create(self, *args, **kwargs): |