dtas-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] dtas-console: remove unused variables


From: Eric Wong
Subject: [PATCH 1/3] dtas-console: remove unused variables
Date: Thu, 31 Oct 2019 10:00:52 +0000

"ruby -w" will warn on them
---
 bin/dtas-console | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bin/dtas-console b/bin/dtas-console
index 00b5cd8..877c9c4 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -53,8 +53,6 @@ def update_tfmt(prec, tsec)
 events = []
 interval = 1.0 / 10 ** prec_nr
 
-pause = nil
-
 def show_events(lineno, screen, events)
   Curses.setpos(lineno += 1, 0)
   Curses.clrtoeol
@@ -135,7 +133,6 @@ def may_fail(res, events)
     pfmt = cur['format']
     elapsed = samples = 0
     fmt = total = ''
-    paused = false
     if current = cur['current']
       infile = current['infile'] || current['command']
       elapsed = DTAS.now - current['spawn_at']
@@ -150,7 +147,6 @@ def may_fail(res, events)
       end
     elsif cur['paused'] && infile = cur['current_paused']
       fmt = "[paused] (#{fmt_to_s(pfmt)})"
-      paused = true
       infile = infile['command'] if Hash === infile
       if Array === infile
         infile, elapsed = infile
@@ -220,10 +216,9 @@ def may_fail(res, events)
         case event
         when "pause"
           if current
-            pause = current['infile'] || current['command']
+            current['infile'] || current['command']
           end
         when %r{\Afile }
-          pause = nil
         end
         events << "#{Time.now.strftime(tfmt)} #{event}"
         # something happened, refresh current



reply via email to

[Prev in Thread] Current Thread [Next in Thread]