# Add a feature to detect the Python version.
config.available_features.add("python%d.%d" % (sys.version_info[0],
sys.version_info[1]))
+
+# Add a feature to detect if psutil is available
+try:
+ import psutil
+ lit_config.note('Found python psutil module')
+ config.available_features.add("python-psutil")
+except ImportError:
+ lit_config.warning('Could not import psutil. Some tests will be skipped and'
+ ' the --timeout command line argument will not work.')