summaryrefslogtreecommitdiff
path: root/bin/update/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/update/tools.py')
-rw-r--r--bin/update/tools.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/update/tools.py b/bin/update/tools.py
index 5d0871b299af..84c7ae6fb0ab 100644
--- a/bin/update/tools.py
+++ b/bin/update/tools.py
@@ -42,3 +42,10 @@ def get_file_info(mar_file, url):
'url' : url + os.path.basename(mar_file)}
return data
+
+def replace_variables_in_string(string, **kwargs):
+ new_string = string
+ for key, val in kwargs.items():
+ new_string = new_string.replace('$(%s)'%key, val)
+
+ return new_string