Skip to content

Commit d670797

Browse files
author
Matteo Cerutti
committed
fixed bug in reporting bbus
1 parent ed95ddd commit d670797

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

megacli/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def execute(self, cmd):
2626
return [re.sub(':$', '', re.sub('\s*:\s*', ':', re.sub('(^\s*|\s*$)', '', line)).lower()) for line in filter(None, out.rstrip().split("\n"))]
2727

2828
def __to_property(self, key, value):
29-
k = key.replace(' ', '_').replace("'s", '').replace('.', '').replace('/', '_')
29+
k = key.replace(' ', '_').replace("'s", '').replace('.', '').replace('/', '_').replace('&', 'and')
3030

3131
if value == 'n/a' or value == 'none':
3232
return k, None
@@ -222,7 +222,7 @@ def bbu(self):
222222
for line in data:
223223
m = re.match('^BBU status for Adapter: (\d+)', line)
224224
if m:
225-
if 'adapter_id' in pd:
225+
if 'adapter_id' in bbu:
226226
ret.append(bbu)
227227
bbu = {}
228228

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from distutils.core import setup
22

3-
version = '0.0.1'
3+
version = '0.0.2'
44

55
setup(
66
name = 'megacli',

0 commit comments

Comments
 (0)