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@xxxxxxxxxx
Reporter: myllynen@xxxxxxxxxx
QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
CC: brolley@xxxxxxxxxx, fche@xxxxxxxxxx, lberk@xxxxxxxxxx,
mgoodwin@xxxxxxxxxx, nathans@xxxxxxxxxx,
pcp@xxxxxxxxxxx, scox@xxxxxxxxxx
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
|