Skip to content

Commit 567be16

Browse files
committed
Merge pull request #9 from rdobson/local_fixes
Local fixes
2 parents 330ae5c + 9876257 commit 567be16

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

hwinfo/pci/tests/test_lspci.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,24 @@ class BroadcomNetDeviceParse(TestSingleDeviceNNMMParse):
255255
}
256256

257257

258+
class IntelNetDeviceParser(TestSingleDeviceNNMMParse):
259+
260+
SAMPLE_DATA = '00:19.0 "Ethernet controller [0200]" "Intel Corporation [8086]" "82579LM Gigabit Network Connection [1502]" -r06 "Dell [1028]" "Device [05d2]"'
261+
262+
DEVICE_REC = {
263+
'pci_device_bus_id': '00:19.0',
264+
'pci_device_class': '0200',
265+
'pci_device_class_name': 'Ethernet controller',
266+
'pci_vendor_name': 'Intel Corporation',
267+
'pci_vendor_id': '8086',
268+
'pci_device_id': '1502',
269+
'pci_device_name': '82579LM Gigabit Network Connection',
270+
'pci_subvendor_name': 'Dell',
271+
'pci_subvendor_id': '1028',
272+
'pci_subdevice_name': 'Device',
273+
'pci_subdevice_id': '05d2',
274+
}
275+
258276
class TestMultiDeviceNNMMParse(unittest.TestCase):
259277

260278
SAMPLE_FILE = '%s/lspci-nnmm' % DATA_DIR

hwinfo/tools/inspector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def remote_command(host, username, password, cmd):
2727
return ''.join(output)
2828

2929
def local_command(cmd):
30-
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
30+
cmdstr = ' '.join(cmd)
31+
process = subprocess.Popen(cmdstr, stdout=subprocess.PIPE, shell=True)
3132
stdout, stderr = process.communicate()
3233
if process.returncode == 0:
3334
return str(stdout).strip()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
name='python-hwinfo',
77
author='Rob Dobson',
88
author_email = '[email protected]',
9-
version = '0.1',
9+
version = '0.1.1',
1010
description = 'Library for parsing hardware info on Linux/Unix OSes.',
1111
url = 'https://github.com/rdobson/python-hwinfo',
12-
download_url = 'https://github.com/rdobson/python-hwinfo/tarball/0.1',
12+
download_url = 'https://github.com/rdobson/python-hwinfo/tarball/0.1.1',
1313
packages=find_packages(),
1414
entry_points = {
1515
'console_scripts': [

0 commit comments

Comments
 (0)