Skip to content

Commit

Permalink
Fix #69 (bad error when container not found)
Browse files Browse the repository at this point in the history
  • Loading branch information
lavie committed Jun 16, 2021
1 parent c9e5650 commit a05caf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runlike/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def __init__(self, container, no_name, pretty):
def inspect(self):
try:
output = check_output(
["docker", "inspect", self.container],
["docker", "container", "inspect", self.container],
stderr=STDOUT)
self.facts = loads(output.decode())
except CalledProcessError as e:
if "No such image or container" in e.output:
if b"No such container" in e.output:
die("No such container %s" % self.container)
else:
die(str(e))
Expand Down

0 comments on commit a05caf4

Please sign in to comment.