Skip to content

Commit 3185d0e

Browse files
authored
Fixed tags breaking up into individual characters
Fixed __listtotag function to check for string, split by whitespace, re-concatenate and trim trailing.
1 parent 658e38f commit 3185d0e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

meraki/legacy.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -901,17 +901,18 @@ def __listtotag(taglist):
901901
Args:
902902
taglist: Space separated list of tags in a single string
903903
904-
Returns: List type variable containing all tags
904+
Returns: Space delimited string type variable containing all tags
905905
906906
"""
907907

908-
liststr = ' '
908+
liststr = ''
909909

910-
if not isinstance(taglist, list):
911-
taglist = list(taglist)
910+
if isinstance(taglist, str):
911+
taglist = taglist.split()
912912

913913
for t in taglist:
914-
liststr = liststr + t + ' '
914+
liststr = liststr + t + ' '
915+
liststr = liststr[:len(liststr)-1]
915916

916917
return liststr
917918

0 commit comments

Comments
 (0)