Skip to content

Issues with the first test provided #1

@davej0731

Description

@davej0731

Installed the wrapper client and sh for python.

After installation I just wanted to test the simple example you provided so I copied and pasted it into a python script, changing the parameters of username,password, and host.

When I go to execute it I get the following error:

[root@localhost smbtests]# python wmitest.py
Traceback (most recent call last):
File "wmitest.py", line 11, in
output = wmic.query("SELECT * FROM Win32_Processor")
File "/usr/lib/python2.6/site-packages/wmi_client_wrapper/wrapper.py", line 92, in query
output = sh.wmic(_arguments)
File "/usr/lib/python2.6/site-packages/sh.py", line 1721, in getattr
return self.env[name]
File "/usr/lib/python2.6/site-packages/sh.py", line 1660, in getitem
return Command._create(k, *_self.baked_args)
File "/usr/lib/python2.6/site-packages/sh.py", line 540, in _create
if not path: raise CommandNotFound(program)
sh.CommandNotFound: wmic

Am I missing another package?

Code:

!/usr/bin/python

import wmi_client_wrapper as wmi
import sh
import mock

wmic = wmi.WmiClientWrapper(
username="username",
password="password",
host="192.168.1.100",
)

output = wmic.query("SELECT * FROM Win32_Processor")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions