summaryrefslogtreecommitdiff
path: root/new/lib
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2025-10-31 12:44:09 +0100
committerdd <dd@wx.tnyzeq.icu>2025-10-31 12:44:09 +0100
commit527ab8a466b0fe0146590468c8ebbb2d0a56bf60 (patch)
tree71623ab18132a737b896684aef12aebd3ed659d2 /new/lib
parentdf0b1d68695327f5cd42c9a499991ec7f0e60769 (diff)
downloadvyos-jenkins-527ab8a466b0fe0146590468c8ebbb2d0a56bf60.tar.gz
vyos-jenkins-527ab8a466b0fe0146590468c8ebbb2d0a56bf60.zip
updated package builder support detection of changes inside dependent repositories
Diffstat (limited to 'new/lib')
-rw-r--r--new/lib/helpers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/new/lib/helpers.py b/new/lib/helpers.py
index 187e1d9..6dfed99 100644
--- a/new/lib/helpers.py
+++ b/new/lib/helpers.py
@@ -30,6 +30,13 @@ def quote_all(*args):
return tuple(quoted)
+def sanitize_filename(any_string):
+ sanitized = re.sub(r"[^A-Za-z0-9\-._]", "_", any_string)
+ sanitized = re.sub(r"_+", "_", sanitized)
+ sanitized = sanitized.strip("_")
+ return sanitized
+
+
def execute(command, timeout: int = None, passthrough=False, passthrough_prefix=None, passthrough_output=False,
**kwargs):
if passthrough: