Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 542399a8 authored by Cole Faust's avatar Cole Faust Committed by Gerrit Code Review
Browse files

Merge "Make mkstrip always return a string"

parents 63e1012b 5e431095
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -767,8 +767,11 @@ def _mkstrip(s):
    That is, removes string's leading and trailing whitespace characters and
    replaces any sequence of whitespace characters with with a single space.
    """
    if type(s) != "string":
        return s
    t = type(s)
    if t == "list":
        s = " ".join(s)
    elif t != "string":
        fail("Argument to mkstrip must be a string or list.")
    result = ""
    was_space = False
    for ch in s.strip().elems():