Refactored sdp serializers
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
def sysarg_to_string(argv):
|
||||
"""
|
||||
Transform a list of strings into a single string
|
||||
Add quotes if needed
|
||||
:return:
|
||||
"""
|
||||
if argv is None or not argv:
|
||||
return ""
|
||||
|
||||
result = ""
|
||||
first = True
|
||||
for s in argv:
|
||||
if not first:
|
||||
result += " "
|
||||
|
||||
result += '"' + s + '"' if " " in s else s
|
||||
first = False
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user