Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker_container_runner/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import yaml
import sys
import os
import re
import bgtunnel
from bgtunnel import SSHTunnelError

Expand All @@ -12,7 +13,8 @@ def read_appconfig(filename):
print "no filename given, or incorrect file"
return err

config = yaml.load(stream)
config = yaml.load(os.path.expandvars(re.sub(
r'\%([a-zA-Z0-9\-_]+)',r'\1=$\1', stream.read())))

directives = {}

Expand Down Expand Up @@ -124,7 +126,7 @@ def read_settings(filename='settings.yml'):
print "no filename given, or incorrect file"
return err

settings = yaml.load(stream)
settings = yaml.load(os.path.expandvars(stream.read()))

items = settings['default']
items['registry_login'] = try_replace_vars(items.get("registry_login", None))
Expand Down