hobo: fix --redeploy to find hobo.json and the appropriate service (#9771)
This commit is contained in:
parent
4e5305b669
commit
1b7b49186d
|
@ -53,12 +53,13 @@ class CmdCheckHobos(Command):
|
|||
for tenant in os.listdir(publisher.WcsPublisher.APP_DIR):
|
||||
if tenant.endswith('.invalid'):
|
||||
continue
|
||||
hobo_json_path = os.path.join(tenant, 'hobo.json')
|
||||
hobo_json_path = os.path.join(publisher.WcsPublisher.APP_DIR, tenant, 'hobo.json')
|
||||
if not os.path.exists(hobo_json_path):
|
||||
continue
|
||||
hobo_json = json.load(open(hobo_json_path))
|
||||
try:
|
||||
me = [service for service in hobo_json['services'] if service['this'] is True][0]
|
||||
me = [service for service in hobo_json['services']
|
||||
if service.get('this') is True][0]
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue