You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Nuno Santos (Resolved) (JIRA)" <ji...@apache.org> on 2011/11/02 21:49:32 UTC

[jira] [Resolved] (QPID-3578) qpid-queue-stats doesn't support multiple filters (despite --help saying it does)

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

Nuno Santos resolved QPID-3578.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.14

Tested and committed the patch supplied by Andy Goldstein, at svn rev 1196793.
                
> qpid-queue-stats doesn't support multiple filters (despite --help saying it does)
> ---------------------------------------------------------------------------------
>
>                 Key: QPID-3578
>                 URL: https://issues.apache.org/jira/browse/QPID-3578
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>            Reporter: Andy Goldstein
>            Priority: Minor
>             Fix For: 0.14
>
>         Attachments: qpid-3578.diff
>
>
> Trying to use multiple filters with qpid-queue-stats does not work due to an indentation issue in the Python code.  For example:
> {noformat}
> qpid-queue-stats -f "a.*,b.*"
> {noformat}
> will only find queues matching the a.* pattern.
> The issue is that if the first pattern fails, instead of trying all additional patterns, execution stops.  This is because the check to see if all matches failed is indented one level too far to the right.  As a result, this check executes inside the for loop, instead of outside.  The diff below fixes the issue:
> {noformat}
> diff --git a/qpid/tools/src/py/qpid-queue-stats b/qpid/tools/src/py/qpid-queue-stats
> index 54f22df..562ccce 100755
> --- a/qpid/tools/src/py/qpid-queue-stats
> +++ b/qpid/tools/src/py/qpid-queue-stats
> @@ -84,8 +84,8 @@ class BrokerManager(Console):
>          if x.match(name):                 
>            match = True
>            break
> -        if match == False:
> -          return
> +      if match == False:
> +        return
>  
>      if last == None:
>        lastSample = first
> {noformat}

--
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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org