mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
zdtm.py: Make print_sep shorter and print aligned lines
Current implementation of print_sep has off-by-one-like issue -- it can print one character more :) Fix this and make the code shorter. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -659,9 +659,7 @@ def self_checkskip(tname):
|
||||
return False
|
||||
|
||||
def print_sep(title, sep = "="):
|
||||
sep_len = (80 - len(title) - 2) / 2
|
||||
sep = sep * sep_len
|
||||
print "%s %s %s" % (sep, title, sep)
|
||||
print (" " + title + " ").center(80, sep)
|
||||
|
||||
def grep_errors(fname):
|
||||
print_sep("grep Error")
|
||||
|
Reference in New Issue
Block a user