commit 730051edd9a3c357eb81c3ebc3d5b9e490e1d9fe Author: Damian Johnson atagar@torproject.org Date: Mon Sep 1 20:53:07 2014 -0700
Dropping the pad_str() function
Turns out it's unused. If it wasn't then the buildin str's ljust does the exact same thing. :) --- arm/util/ui_tools.py | 16 ---------------- 1 file changed, 16 deletions(-)
diff --git a/arm/util/ui_tools.py b/arm/util/ui_tools.py index cfa6ba3..d2a6f43 100644 --- a/arm/util/ui_tools.py +++ b/arm/util/ui_tools.py @@ -181,22 +181,6 @@ def get_printable(line, keep_newlines = True): return line
-def pad_str(msg, size, crop_extra = False): - """ - Provides the string padded with whitespace to the given length. - - Arguments: - msg - string to be padded - size - length to be padded to - crop_extra - crops string if it's longer than the size if true - """ - - if crop_extra: - msg = msg[:size] - - return ("%%-%is" % size) % msg - - def draw_box(panel, top, left, width, height, attr=curses.A_NORMAL): """ Draws a box in the panel with the given bounds.
tor-commits@lists.torproject.org