Skip to content

Commit 4d5ace8

Browse files
committed
only do curses ops when required
1 parent 36bd914 commit 4d5ace8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cv/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AppConfig(object):
4141

4242
class Main(object):
4343
def nprint(self, str):
44-
if self.config.monitor or self.config.monitor_continuous:
44+
if self.config.curses:
4545
self.mainwin.addstr(str)
4646
else:
4747
print(str, end="")
@@ -222,7 +222,8 @@ def main(self):
222222
results = []
223223
while True:
224224
results = self.monitor_processes()
225-
self.mainwin.refresh()
225+
if self.config.curses:
226+
self.mainwin.refresh()
226227
if self.config.monitor_continuous and not results:
227228
sleep(self.config.throughput_wait_secs)
228229
if not ((self.config.monitor and results) or self.config.monitor_continuous):

0 commit comments

Comments
 (0)