summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey <jcollie@fedoraproject.org>2007-01-29 15:24:33 (GMT)
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2007-01-29 15:24:33 (GMT)
commit1065434b119a6eb285c9336c43de09ab3e8e8261 (patch)
treed961162f3320027a4bb0896d72b6666820d9753a
parent2f4ed068ebd6e255ad1364c031c230fa280445f4 (diff)
downloadsmolt-1065434b119a6eb285c9336c43de09ab3e8e8261.zip
smolt-1065434b119a6eb285c9336c43de09ab3e8e8261.tar.gz
smolt-1065434b119a6eb285c9336c43de09ab3e8e8261.tar.xz
Move the default-setting code back outside of the loop.
-rw-r--r--hw-client/Profile.py39
1 files changed, 20 insertions, 19 deletions
diff --git a/hw-client/Profile.py b/hw-client/Profile.py
index 263cb3c..8deb688 100644
--- a/hw-client/Profile.py
+++ b/hw-client/Profile.py
@@ -56,25 +56,26 @@ class Profile:
self.system = device['system']
except:
pass
-# Defaults for when hardware doesnt return anything. namely a new cpu type
- if self.platform == '':
- self.platform = 'Unknown'
- if self.bogomips == '':
- self.bogomips = 1
- if self.CPUVendor == '':
- self.CPUVendor = 'Unknown'
- if self.numCPUs == '':
- self.numCPUs = 1
- if self.CPUSpeed == '':
- self.CPUSpeed = 0
- if self.systemMemory == '':
- self.systemMemory = 0
- if self.systemSwap == '':
- self.systemSwap = 0
- if self.vendor == '':
- self.vendor = 'Unknown'
- if self.system == '':
- self.system = 'Unknown'
+
+ # Defaults for when hardware doesnt return anything. namely a new cpu type
+ if self.platform == '':
+ self.platform = 'Unknown'
+ if self.bogomips == '':
+ self.bogomips = 1
+ if self.CPUVendor == '':
+ self.CPUVendor = 'Unknown'
+ if self.numCPUs == '':
+ self.numCPUs = 1
+ if self.CPUSpeed == '':
+ self.CPUSpeed = 0
+ if self.systemMemory == '':
+ self.systemMemory = 0
+ if self.systemSwap == '':
+ self.systemSwap = 0
+ if self.vendor == '':
+ self.vendor = 'Unknown'
+ if self.system == '':
+ self.system = 'Unknown'
def get_host_string(self):