]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2136] Assign and use intval earlier
authorMukund Sivaraman <muks@isc.org>
Wed, 8 Aug 2012 04:58:45 +0000 (10:28 +0530)
committerNaoki Kambe <kambe@jprs.co.jp>
Wed, 8 Aug 2012 12:06:29 +0000 (21:06 +0900)
src/bin/stats/stats.py.in

index a712748cb2590d3035e894dbf18b474a3cff3495..88ca3884e6e0740da852d545d3f312c748be2474 100755 (executable)
@@ -269,8 +269,8 @@ class Stats:
             while self.running:
                 _check_command()
                 now = get_timestamp()
-                if self.get_interval() > 0 and now >= self.next_polltime:
-                    intval = self.get_interval()
+                intval = self.get_interval()
+                if intval > 0 and now >= self.next_polltime:
                     # decide the next polling timestamp
                     self.next_polltime += intval
                     # adjust next time