[pcp] [Bug 1287778] New: Python PMAPI pmNonOptionsFromList cryptic error message
bugzilla at redhat.com
bugzilla at redhat.com
Wed Dec 2 10:24:11 CST 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1287778
Bug ID: 1287778
Summary: Python PMAPI pmNonOptionsFromList cryptic error
message
Product: Fedora
Version: 23
Component: pcp
Assignee: nathans at redhat.com
Reporter: myllynen at redhat.com
QA Contact: extras-qa at fedoraproject.org
CC: brolley at redhat.com, fche at redhat.com, lberk at redhat.com,
mgoodwin at redhat.com, nathans at redhat.com,
pcp at kenj.com.au, scox at redhat.com
Description of problem:
pmNonOptionsFromList() can fail without really telling why:
localhost:~> cat ./test.py
#!/usr/bin/python
from pcp import pmapi
import sys
opts = pmapi.pmOptions()
print opts.pmNonOptionsFromList(sys.argv)
ctx = pmapi.pmContext.fromOptions(opts, sys.argv)
localhost:~> python ./test.py abc
Traceback (most recent call last):
File "./test.py", line 7, in <module>
print opts.pmNonOptionsFromList(sys.argv)
File "/usr/lib64/python2.7/site-packages/pcp/pmapi.py", line 792, in
pmNonOptionsFromList
return c_api.pmGetNonOptionsFromList(argv)
SystemError: error return without exception set
localhost:~>
If we create the context before calling pmNonOptionsFromList() then it works as
expected. Ideally the above would work also as e.g. in pmrep(1) we need to read
non-options which include references to configuration file entries which will
then in turn be used in context creation.
Thanks.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=MDACkzTlrd&a=cc_unsubscribe
More information about the pcp
mailing list