Skip to content

@with_category discarded #552

@teto

Description

@teto

I don't know if it's a cmd2 problem or with my code.

There are some member functions for which I have:

    @is_loaded
    @with_category("mptcp")
    def do_list_mptcp_connections(self, *args):
         print("john doe")

with

def is_loaded(f):
    """
    Decorator checking that dataset has correct columns
    """
    def wrapped(self, *args):
        if self.data is not None:
            return f(self, *args)
        else:
            raise mp.MpTcpException("Please load a pcap with `load_pcap` first")
        return None
    return wrapped

These functions don't appear in the "mptcp" category. If I remove the is_loaded decorator, they do appear. I tried swapping the order of decorators but either way the function is not listed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions