Skip to content

Commit 0b27e2e

Browse files
committed
Don't fail when secrets missing
1 parent a15bda2 commit 0b27e2e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

staff/sys/ocf-kubernetes-deploy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ def main():
8585
else:
8686
filename = os.path.join(args.secrets, args.appname + '.yaml')
8787

88-
with open(filename, 'r') as stream:
89-
bindings.update(yaml.safe_load(stream))
88+
try:
89+
with open(filename, 'r') as stream:
90+
bindings.update(yaml.safe_load(stream))
91+
except FileNotFoundError:
92+
print('Secrets file not found')
9093

9194
# Created with 600 perms
9295
with tempfile.NamedTemporaryFile(suffix='.json') as bindings_file:

0 commit comments

Comments
 (0)