2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-04-13 04:11:31 +00:00

Fix a couple of formatting issues

This commit is contained in:
Jarrod Johnson
2016-07-19 09:15:45 -04:00
parent 27524ab3ce
commit 786a1ec93e

View File

@@ -51,6 +51,7 @@ sensor_categories = {
'fans': frozenset(['Fan', 'Cooling Device']),
}
def hex2bin(hexstring):
hexvals = hexstring.split(':')
if len(hexvals) < 2:
@@ -60,6 +61,7 @@ def hex2bin(hexstring):
bytedata = [int(i, 16) for i in hexvals]
return bytearray(bytedata)
def simplify_name(name):
return name.lower().replace(' ', '_').replace('/', '-')