From 635fbad9b5bb5b6f723996cc9861bc90d3769aa1 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 21 Dec 2012 17:26:26 +0100 Subject: Postpone loading of the rteval.SystemInfo module This is to avoid an annoying DMI warning if the RtEval() class is not going to be used. Signed-off-by: David Sommerseth --- rteval/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rteval') diff --git a/rteval/__init__.py b/rteval/__init__.py index 80cd5f9..8328ae8 100644 --- a/rteval/__init__.py +++ b/rteval/__init__.py @@ -34,7 +34,6 @@ __license__ = "GPLv2 License" import os, signal, sys, threading, time from datetime import datetime from distutils import sysconfig -from sysinfo import SystemInfo from modules.loads import LoadModules from modules.measurement import MeasurementModules, MeasurementProfile from rtevalReport import rtevalReport @@ -81,6 +80,8 @@ class RtEval(rtevalReport): self.__rtevcfg = self.__cfg.GetSection('rteval') self.__reportdir = None + # Import SystemInfo here, to avoid DMI warnings if RtEval() is not used + from sysinfo import SystemInfo self._sysinfo = SystemInfo(self.__rtevcfg, logger=self.__logger) # prepare a mailer, if that's configured -- cgit