aboutsummaryrefslogtreecommitdiff
path: root/prepare-config.py
diff options
context:
space:
mode:
Diffstat (limited to 'prepare-config.py')
-rwxr-xr-xprepare-config.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/prepare-config.py b/prepare-config.py
index 3678ee4..94f81f0 100755
--- a/prepare-config.py
+++ b/prepare-config.py
@@ -54,7 +54,7 @@ if __name__ == '__main__':
parser.error("Prefix missing")
lava_cache_file = open(LAVA_CACHE_PATH, 'r')
- lava_cache_regexp = re.compile("^(?P<device_id>[a-zA-Z0-9_\-]+):(?P<key>[a-zA-Z0-9_\-]+)=(?P<value>.*)$")
+ lava_cache_regexp = re.compile("^(?P<device_id>[a-zA-Z0-9_\-]+):(?P<key>[a-zA-Z0-9_\-\.]+)=(?P<value>.*)$")
ipaddr = None
for line in lava_cache_file.readlines():
print line
@@ -68,7 +68,8 @@ if __name__ == '__main__':
with open(IPADDR_FILE, "w") as ipaddr_file:
ipaddr_file.write(ipaddr)
lava_cache_file.close()
- if not ipaddr:
+ if ipaddr is None:
+ print "Target device address not found or _MISSING_"
sys.exit(1)
config = open(os.path.join(CONFIG_PATH, options.config), "r")
config_template = Template(config.read())