summaryrefslogtreecommitdiff
path: root/contrib/python
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-28 08:57:21 -0800
committerGitHub <noreply@github.com>2018-11-28 08:57:21 -0800
commit88c23b0632518d5b1449b0cd2afa82f4bd53a287 (patch)
tree770ba9138f698f067c833bf92d676c3bd1a34543 /contrib/python
parent8c15a1e067f510ca8471ca2a81cdf704e374332a (diff)
parent8b2affbd5bc56e822059b07730b52870760d39be (diff)
downloadpodman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.tar.gz
podman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.tar.bz2
podman-88c23b0632518d5b1449b0cd2afa82f4bd53a287.zip
Merge pull request #1885 from edsantiago/split_token_none
_split_token(): handle None
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/podman/podman/libs/images.py5
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):