Revision 63b883de lib/utils/text.py
b/lib/utils/text.py | ||
---|---|---|
588 | 588 |
return text |
589 | 589 |
else: |
590 | 590 |
return text[:length - len(_ASCII_ELLIPSIS)] + _ASCII_ELLIPSIS |
591 |
|
|
592 |
|
|
593 |
def FormatKeyValue(data): |
|
594 |
"""Formats a dictionary as "key=value" parameters. |
|
595 |
|
|
596 |
The keys are sorted to have a stable order. |
|
597 |
|
|
598 |
@type data: dict |
|
599 |
@rtype: list of string |
|
600 |
|
|
601 |
""" |
|
602 |
return ["%s=%s" % (key, value) for (key, value) in sorted(data.items())] |
Also available in: Unified diff