ceph bench module hotfixes after client run
Related-PROD: PROD-37028
Change-Id: Ied20709e367877ca0be1c9bd531476070059de10
diff --git a/cfg_checker/helpers/console_utils.py b/cfg_checker/helpers/console_utils.py
index fa770a3..b45445e 100644
--- a/cfg_checker/helpers/console_utils.py
+++ b/cfg_checker/helpers/console_utils.py
@@ -3,6 +3,32 @@
import sys
+class cl_typewriter(object):
+ previous = 0
+ carret = 0
+
+ def cl_start(self, sttr):
+ self.previous = self.carret
+ self.carret += len(sttr)
+ sys.stdout.write("\r{}".format(sttr))
+
+ def cl_inline(self, sttr):
+ self.carret += len(sttr)
+ sys.stdout.write("{}".format(sttr))
+
+ def cl_sameline(self, sttr):
+ self.cl_inline("\r" + sttr)
+ self.cl_flush()
+
+ def cl_flush(self, newline=False):
+ if newline:
+ self.cl_inline("\n")
+ self.carret = 0
+ elif self.previous > self.carret:
+ self.cl_inline(" "*(self.previous - self.carret))
+ sys.stdout.flush()
+
+
class Progress(object):
_strsize = 0
_note_size = 0