pcp
[Top] [All Lists]

[Bug 1287778] New: Python PMAPI pmNonOptionsFromList cryptic error messa

To: pcp@xxxxxxxxxxx
Subject: [Bug 1287778] New: Python PMAPI pmNonOptionsFromList cryptic error message
From: bugzilla@xxxxxxxxxx
Date: Wed, 02 Dec 2015 16:24:11 +0000
Authentication-results: i-otc1esa.syd1.mail-filtering.com.au; spf=Pass smtp.mailfrom=bugzilla@xxxxxxxxxx; spf=Pass smtp.helo=postmaster@xxxxxxxxxxxxxxxxxxx
Auto-submitted: auto-generated
Delivered-to: pcp@xxxxxxxxxxx
Ironport-phdr: 9a23:+tCSbhTRIusu1qNdj4YSexwwt9psv+yvbD5Q0YIujvd0So/mwa65ZBSN2/xhgRfzUJnB7Loc0qyN4/6mATRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niabqo9X6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD88QIrJEbFP2mN+RlFf0LRAkgKH0/sc33qQHYH0zI7GYTQGQSlhMOGQXJ7BjmGJz2t2zmselw3m+RMsyhUeURdR2J7LVXTAXkxi5SPDUO7WfMl8Zrh7haqh/ymxsq24XMSIKYMvg4daTYO9oHFkRbWcMEXTFOEIK4a4InFecNPe9E6YL6oghd5SCiDBWhUbu8ggRDgWX7iPBi3g==
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

<Prev in Thread] Current Thread [Next in Thread>