diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-06-01 15:46:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 15:46:48 -0400 |
commit | e83b007d5161ff6704ec6c39f3708c2ae2a77db0 (patch) | |
tree | 740c6fe0aeeb93bf4ad03c1a041f85eb182f81a7 /contrib/python | |
parent | 8c68fddd1c0b08d7f8c04f1a3fca3ca3f5d2f786 (diff) | |
parent | 80baf0d8009994c34f5bf807a1126093046536bc (diff) | |
download | podman-e83b007d5161ff6704ec6c39f3708c2ae2a77db0.tar.gz podman-e83b007d5161ff6704ec6c39f3708c2ae2a77db0.tar.bz2 podman-e83b007d5161ff6704ec6c39f3708c2ae2a77db0.zip |
Merge pull request #876 from jwhonce/wip/commit
Fix label handling
Diffstat (limited to 'contrib/python')
-rw-r--r-- | contrib/python/Makefile | 1 | ||||
-rw-r--r-- | contrib/python/podman/libs/images.py | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/python/Makefile b/contrib/python/Makefile index d0ec60687..6cb63c403 100644 --- a/contrib/python/Makefile +++ b/contrib/python/Makefile @@ -13,3 +13,4 @@ clean: $(PYTHON) setup.py clean --all rm -rf podman.egg-info dist find . -depth -name __pycache__ -exec rm -rf {} \; + find . -depth -name \*.pyc -exec rm -f {} \; diff --git a/contrib/python/podman/libs/images.py b/contrib/python/podman/libs/images.py index d617a766b..f28cb64aa 100644 --- a/contrib/python/podman/libs/images.py +++ b/contrib/python/podman/libs/images.py @@ -1,5 +1,6 @@ """Models for manipulating images in/to/from storage.""" import collections +import copy import functools import json @@ -45,12 +46,12 @@ class Image(collections.UserDict): with self._client() as podman: details = self.inspect() - # TODO: remove network settings once defaults implemented on service side + # TODO: remove network settings once defaults implemented in service config = Config(image_id=self.id, **kwargs) config['command'] = details.containerconfig['cmd'] config['env'] = self._split_token(details.containerconfig['env']) - config['image'] = details.repotags[0] - config['labels'] = self._split_token(details.labels) + config['image'] = copy.deepcopy(details.repotags[0]) + config['labels'] = copy.deepcopy(details.labels) config['net_mode'] = 'bridge' config['network'] = 'bridge' config['work_dir'] = '/tmp' |