Skip to content

Commit

Permalink
Fix a crash with some docker images
Browse files Browse the repository at this point in the history
Fix #861
  • Loading branch information
julien-duponchelle committed Jan 10, 2017
1 parent 41d32a5 commit 6664612
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gns3server/compute/docker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def list_images(self):
"""
images = []
for image in (yield from self.query("GET", "images/json", params={"all": 0})):
for tag in image['RepoTags']:
if tag != "<none>:<none>":
images.append({'image': tag})
if image['RepoTags']:
for tag in image['RepoTags']:
if tag != "<none>:<none>":
images.append({'image': tag})
return sorted(images, key=lambda i: i['image'])

0 comments on commit 6664612

Please sign in to comment.