mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +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
|
return False
|
||||||
|
|
||||||
def print_sep(title, sep = "="):
|
def print_sep(title, sep = "="):
|
||||||
sep_len = (80 - len(title) - 2) / 2
|
print (" " + title + " ").center(80, sep)
|
||||||
sep = sep * sep_len
|
|
||||||
print "%s %s %s" % (sep, title, sep)
|
|
||||||
|
|
||||||
def grep_errors(fname):
|
def grep_errors(fname):
|
||||||
print_sep("grep Error")
|
print_sep("grep Error")
|
||||||
|
Reference in New Issue
Block a user