summaryrefslogtreecommitdiffstats
path: root/scripts/lib/scriptutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/scriptutils.py')
-rw-r--r--scripts/lib/scriptutils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index bd082d8581..5ccc027968 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -116,3 +116,16 @@ def run_editor(fn):
116 except OSError as exc: 116 except OSError as exc:
117 logger.error("Execution of editor '%s' failed: %s", editor, exc) 117 logger.error("Execution of editor '%s' failed: %s", editor, exc)
118 return 1 118 return 1
119
120def is_src_url(param):
121 """
122 Check if a parameter is a URL and return True if so
123 NOTE: be careful about changing this as it will influence how devtool/recipetool command line handling works
124 """
125 if not param:
126 return False
127 elif '://' in param:
128 return True
129 elif param.startswith('git@') or ('@' in param and param.endswith('.git')):
130 return True
131 return False