btt_plot.py: Fix pylint: no-else-return
authorVincent Legoll <vincent.legoll@gmail.com>
Fri, 20 Mar 2020 21:44:56 +0000 (22:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Mar 2020 21:53:50 +0000 (15:53 -0600)
Unnecessary "elif" after "return"

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
btt/btt_plot.py

index 653ace760758414ed0ec08446d9cb9f2b2434643..b67caaa1d298cbdf4204fec8168dc95ef397b6ff 100755 (executable)
@@ -396,12 +396,11 @@ def do_live(files):
        def live_sort(a, b):
                if a[0] == 'sys' and b[0] == 'sys':
                        return 0
-               elif a[0] == 'sys' or a[2][0] < b[2][0]:
+               if a[0] == 'sys' or a[2][0] < b[2][0]:
                        return -1
-               elif b[0] == 'sys' or a[2][0] > b[2][0]:
+               if b[0] == 'sys' or a[2][0] > b[2][0]:
                        return  1
-               else:
-                       return  0
+               return  0
 
        #----------------------------------------------------------------------
        def turn_off_ticks(ax):