from collections import OrderedDict
from fcntl import ioctl
from fnmatch import fnmatch
-from prettytable import PrettyTable, HEADER
+try:
+ from prettytable import PrettyTable, HEADER
+except ImportError:
+ # only allowed for test
+ PrettyTable = None
from signal import signal, SIGWINCH
from termios import TIOCGWINSZ
"""
Show all selected stats with section, full name, nick, and prio
"""
+ if PrettyTable is None:
+ ostr.write('unable to import prettytable\n')
+ return
table = PrettyTable(('section', 'name', 'nick', 'prio'))
table.align['section'] = 'l'
table.align['name'] = 'l'