Commit 0c85687b authored by Antoine Catton's avatar Antoine Catton

Fix: always stopping noname container

parent d2312c15
......@@ -61,10 +61,10 @@ def main(sr_directory, partition_list, database):
# Stop unwanted running containers #
####################################
try:
active_containers = set(call(
active_containers = set((container.strip() for container in call(
[os.path.join(sr_directory, 'parts/lxc/bin/lxc-ls'),
'--active']
).split('\n'))
).split('\n') if container.strip()))
logger.debug('Active containers are %s.', ', '.join(active_containers))
except SlapContainerError:
active_containers = set()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment