Browse Source

Remove conditional imports

check-vt100
Aleksander Kiryk 4 years ago
parent
commit
40ce356bab
  1. 5
      sargraph.py
  2. 5
      watch.py

5
sargraph.py

@ -9,6 +9,8 @@ import argparse
import sys
import time
import graph
import watch
from common import *
@ -37,8 +39,6 @@ if version is None:
# If the script was run with no parameters, run in background and gather data
if args.session is None:
import watch
# Find requested disk device
if args.fspath:
args.fspath = os.path.realpath(args.fspath)
@ -104,7 +104,6 @@ elif cmd[0] == 'save':
else:
send(sid, f"command:s:{cmd[1]}")
elif cmd[0] == 'plot':
import graph
if len(cmd) < 2:
graph.graph(sid)
else:

5
watch.py

@ -16,6 +16,8 @@ import subprocess
import sys
import time
import graph
from common import *
die = 0
@ -164,10 +166,8 @@ def watch(session, fsdev):
if label_line == "none":
pass
elif label_line:
import graph
graph.graph(session, label_line)
elif not dont_plot:
import graph
graph.graph(session)
die = 1
break
@ -177,7 +177,6 @@ def watch(session, fsdev):
dont_plot = True
if label_line != "none":
import graph
summarize(session)
if not label_line:
graph.graph(session)

Loading…
Cancel
Save