Compare commits

2 Commits

Author SHA1 Message Date
Red5d
b9c096dd94 Merge pull request #33 from moschlar/patch-1
Update autocompose.py
2022-03-07 14:50:04 -05:00
Moritz Schlarb
e7dbe41f23 Update autocompose.py
Print error message to stderr so that I will be seen when redirecting stdout to `docker-compose.yml`
2022-03-07 11:56:06 +01:00

View File

@@ -32,7 +32,7 @@ def generate(cname):
try:
cid = [x.short_id for x in c.containers.list(all=True) if cname == x.name or x.short_id in cname][0]
except IndexError:
print("That container is not available.")
print("That container is not available.", file=sys.stderr)
sys.exit(1)
cattrs = c.containers.get(cid).attrs