pcp
[Top] [All Lists]

[Bug 1289912] New: Python PMAPI command line parsing

To: pcp@xxxxxxxxxxx
Subject: [Bug 1289912] New: Python PMAPI command line parsing
From: bugzilla@xxxxxxxxxx
Date: Wed, 09 Dec 2015 10:41:09 +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:zZZnYx0dBeK2RdgbsmDT+DRfVm0co7zxezQtwd8ZsekWKvad9pjvdHbS+e9qxAeQG96LtbQc06L/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbSrXNaKx+2MlMmMuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4yrc4rH8V465pt5MYEPayQqIjULYNDCg6K3tno4rhqBbRTA+L7z0GX2kWmwYOCA/Aqw39XZr39CD1t71hjXeCBtavS6kTQwbs5vJgQyj1jjwaPSUy6mDdh59Mi/dDqwqJpBF5wcjfZ4TTPectULnaeIYQWGVTX8JVXgRbD4+8ZpdJBO0EbrUQlJX0u1Zb9Uj2PgKrHu66l2dF
https://bugzilla.redhat.com/show_bug.cgi?id=1289912

            Bug ID: 1289912
           Summary: Python PMAPI command line parsing
           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:
% cat t.py
#!/usr/bin/env python

import sys
import os

from pcp import pmapi

class T(object):
    def __init__(self):
        self.context = None
        self.opts = pmapi.pmOptions()
        self.opts.pmSetShortOptions("h:")
        self.opts.pmSetLongOptionHost()
        print pmapi.c_api.pmGetOptionsFromList(sys.argv)
        print self.opts.pmNonOptionsFromList(sys.argv)
        self.context = pmapi.pmContext.fromOptions(self.opts, sys.argv,
self.opts.pmGetOptionContext())

if __name__ == '__main__':
    try:
        T()
    except pmapi.pmUsageErr as usage:
        usage.message()
% python ./t.py -h local: abc
0
['abc']
% python ./t.py abc -h local: 
0
['local:']
%

-- 
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=6pSs1nqOrZ&a=cc_unsubscribe

<Prev in Thread] Current Thread [Next in Thread>
  • [Bug 1289912] New: Python PMAPI command line parsing, bugzilla <=