Bug: Properly resolve conainer service name

This commit is contained in:
Einar Forselv 2020-03-07 03:05:40 +01:00
parent cecc647a10
commit d4c77cf43d
1 changed files with 1 additions and 3 deletions

View File

@ -72,9 +72,7 @@ class Container:
@property
def service_name(self) -> str:
"""Name of the container/service"""
name = self.get_label('com.docker.compose.service', default='')
if not name:
return self.get_label('com.docker.swarm.service.name', default='')
return self.get_label('com.docker.compose.service', default='') or self.get_label('com.docker.swarm.service.name', default='')
@property
def backup_process_label(self) -> str: