Fix the python NetworkBandwidth conversion function
python/m5/convert.py: Fix the NetworkBandwidth conversion function --HG-- extra : convert_revision : 93d9856fe6b59827c116e15835d2ef51292bd6c4
This commit is contained in:
parent
1ee77fb23e
commit
f3544a13f3
1 changed files with 5 additions and 5 deletions
|
@ -153,15 +153,15 @@ def toNetworkBandwidth(value):
|
|||
raise TypeError, "wrong type '%s' should be str" % type(value)
|
||||
|
||||
if value.endswith('Tbps'):
|
||||
return float(value[:-3]) * tera
|
||||
return float(value[:-4]) * tera
|
||||
elif value.endswith('Gbps'):
|
||||
return float(value[:-3]) * giga
|
||||
return float(value[:-4]) * giga
|
||||
elif value.endswith('Mbps'):
|
||||
return float(value[:-3]) * mega
|
||||
return float(value[:-4]) * mega
|
||||
elif value.endswith('kbps'):
|
||||
return float(value[:-3]) * kilo
|
||||
return float(value[:-4]) * kilo
|
||||
elif value.endswith('bps'):
|
||||
return float(value[:-2])
|
||||
return float(value[:-3])
|
||||
else:
|
||||
return float(value)
|
||||
|
||||
|
|
Loading…
Reference in a new issue