summaryrefslogtreecommitdiffstats
path: root/commands/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'commands/hardware')
-rw-r--r--commands/hardware/lmi/scripts/hardware/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/commands/hardware/lmi/scripts/hardware/__init__.py b/commands/hardware/lmi/scripts/hardware/__init__.py
index faa6cd0..dae84f4 100644
--- a/commands/hardware/lmi/scripts/hardware/__init__.py
+++ b/commands/hardware/lmi/scripts/hardware/__init__.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (C) 2013-2014 Red Hat, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -368,6 +369,13 @@ def get_disks_info(ns):
else:
smart = get_colored_string('Unknown', YELLOW_COLOR)
+ temp = ''
+ if hdd.Temperature:
+ temp = '%d' % hdd.Temperature
+ if not temp:
+ temp = 'N/A'
+ temp = temp + u' °C'
+
if not first_disk:
result.append(EMPTY_LINE)
else:
@@ -386,5 +394,6 @@ def get_disks_info(ns):
(' Port Type:', port_type),
(' Port Speed:', '%s current, %s max' % \
(port_speed_current, port_speed_max)),
- (' SMART Status:', smart)]
+ (' SMART Status:', smart),
+ (' Temperature:', temp)]
return result