]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-top: set the cursor to be invisible 40539/head
authorXiubo Li <xiubli@redhat.com>
Fri, 2 Apr 2021 01:03:02 +0000 (09:03 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 15 Apr 2021 08:27:57 +0000 (16:27 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/tools/cephfs/top/cephfs-top

index a4ed0465a896a216a3b960b5fa589f4277dfb18f..2e35adaabcc4cb22f67b00c68a68d57ecee1c819 100755 (executable)
@@ -148,6 +148,14 @@ class FSTop(object):
 
     def setup_curses(self, win):
         self.stdscr = win
+        curses.use_default_colors()
+        curses.start_color()
+        try:
+            curses.curs_set(0)
+        except curses.error:
+            # If the terminal do not support the visibility
+            # requested it will raise an exception
+            pass
         self.run_display()
 
     def verify_perf_stats_support(self):