[ 
https://issues.apache.org/jira/browse/QPID-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3737.
----------------------------


Confirmed fixed in 0.16 release.
                
> Patch to make qpid-stat -L option work
> --------------------------------------
>
>                 Key: QPID-3737
>                 URL: https://issues.apache.org/jira/browse/QPID-3737
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Tools
>    Affects Versions: 0.12
>            Reporter: Paul Colby
>            Assignee: Ted Ross
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.15
>
>         Attachments: qpid-stat.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Current behaviour:
> {code}
> qpid -qIS queue         // Shows up to 50 queues.
> qpid -qIS queue -L 0    // Shows as many queues as possible (ie no limit).
> qpid -qIS queue -L 1    // Shows as many queues as possible (ie no limit).
> qpid -qIS queue -L 10   // Shows as many queues as possible (ie no limit).
> qpid -qIS queue -L 100  // Shows as many queues as possible (ie no limit).
> qpid -qIS queue -L blah // Shows as many queues as possible (ie no limit).
> {code}
> This happens because:
> # the default limit is 50, and
> # the limit argument is read as a string, but compared to an int in the 
> Sorter constructor - a comparison that always fails.
> Behaviour after the near-trivial attached patch:
> {code}
> qpid -qIS queue         // Shows up to 50 queues.
> qpid -qIS queue -L 0    // Shows as many queues as possible (ie no limit).
> qpid -qIS queue -L 1    // Shows up to 1 queue.
> qpid -qIS queue -L 10   // Shows up to 10 queues.
> qpid -qIS queue -L 100  // Shows up to 100 queues.
> qpid -qIS queue -L blah // qpid-stat: error: option -L: invalid integer 
> value: 'foo'
> {code}
> I'll attach the patch, but's for the impatient ;)
> {code}
> Index: qpid-stat
> ===================================================================
> --- qpid-stat   (revision 1229483)
> +++ qpid-stat   (working copy)
> @@ -70,7 +70,7 @@
>                    help="Sort by column name")
>      group2.add_option("-I", "--increasing", action="store_true", 
> default=False,
>                    help="Sort by increasing value (default = decreasing)")
> -    group2.add_option("-L", "--limit", default=50, metavar="<n>",
> +    group2.add_option("-L", "--limit", type="int", default=50, metavar="<n>",
>                    help="Limit output to n rows")
>      group2.add_option("-C", "--cluster", action="store_true", default=False,
>                    help="Display per-broker cluster detail.")
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to